Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Microjournal
microjournal
Commits
b5da1cfb
Commit
b5da1cfb
authored
Jan 13, 2019
by
Steve Streza
Browse files
Fix lerna
parent
869b11a9
Pipeline
#700
failed with stage
in 4 minutes and 20 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
137 additions
and
53 deletions
+137
-53
lerna.json
lerna.json
+3
-4
packages/accessor-api/package.json
packages/accessor-api/package.json
+5
-1
packages/accessor-empty/package.json
packages/accessor-empty/package.json
+4
-2
packages/accessor-folder/package.json
packages/accessor-folder/package.json
+4
-2
packages/accessor-folder/tsconfig.json
packages/accessor-folder/tsconfig.json
+2
-1
packages/accessor/package.json
packages/accessor/package.json
+5
-1
packages/cli/index.ts
packages/cli/index.ts
+50
-32
packages/cli/package-lock.json
packages/cli/package-lock.json
+7
-2
packages/cli/package.json
packages/cli/package.json
+7
-4
packages/cli/tsconfig.json
packages/cli/tsconfig.json
+4
-1
packages/data-store/package-lock.json
packages/data-store/package-lock.json
+33
-0
packages/data-store/package.json
packages/data-store/package.json
+8
-2
packages/journal/package.json
packages/journal/package.json
+5
-1
No files found.
lerna.json
View file @
b5da1cfb
{
"packages"
:
[
"packages/*"
],
"version"
:
"0.0.0"
"packages"
:
[
"packages/*"
],
"hoist"
:
false
,
"version"
:
"0.0.0"
}
packages/accessor-api/package.json
View file @
b5da1cfb
...
...
@@ -2,11 +2,12 @@
"name"
:
"@microjournal/accessor-api"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"tsc -p ."
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"keywords"
:
[],
...
...
@@ -15,5 +16,8 @@
"dependencies"
:
{
"@microjournal/accessor"
:
"1.0.0"
,
"rxjs"
:
"^6.3.3"
},
"devDependencies"
:
{
"typescript"
:
"^3.2.2"
}
}
packages/accessor-empty/package.json
View file @
b5da1cfb
...
...
@@ -2,11 +2,12 @@
"name"
:
"@microjournal/accessor-empty"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"tsc -p ."
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"keywords"
:
[],
...
...
@@ -14,6 +15,7 @@
"license"
:
"ISC"
,
"dependencies"
:
{
"@microjournal/accessor"
:
"1.0.0"
,
"rxjs"
:
"^6.3.3"
"rxjs"
:
"^6.3.3"
,
"typescript"
:
"^3.2.2"
}
}
packages/accessor-folder/package.json
View file @
b5da1cfb
...
...
@@ -2,11 +2,12 @@
"name"
:
"@microjournal/accessor-folder"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/accessor-folder/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"tsc -p ."
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"keywords"
:
[],
...
...
@@ -22,6 +23,7 @@
},
"devDependencies"
:
{
"@types/bluebird"
:
"^3.5.25"
,
"@types/mkdirp"
:
"^0.5.2"
"@types/mkdirp"
:
"^0.5.2"
,
"typescript"
:
"^3.2.2"
}
}
packages/accessor-folder/tsconfig.json
View file @
b5da1cfb
...
...
@@ -3,5 +3,6 @@
"compilerOptions"
:
{
"outDir"
:
"./lib"
},
"include"
:
[
"./index.ts"
]
"include"
:
[
"./index.ts"
],
"exclude"
:
[
"node_modules"
]
}
packages/accessor/package.json
View file @
b5da1cfb
...
...
@@ -2,11 +2,12 @@
"name"
:
"@microjournal/accessor"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"tsc -p ."
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"keywords"
:
[],
...
...
@@ -14,5 +15,8 @@
"license"
:
"ISC"
,
"dependencies"
:
{
"rxjs"
:
"^6.3.3"
},
"devDependencies"
:
{
"typescript"
:
"^3.2.2"
}
}
packages/cli/index.ts
View file @
b5da1cfb
...
...
@@ -2,36 +2,27 @@ import DataStore from "@microjournal/data-store";
import
FolderAccessor
from
"
@microjournal/accessor-folder
"
;
import
{
join
as
joinPath
}
from
"
path
"
import
{
homedir
}
from
"
os
"
import
*
as
Yargs
from
'
yargs
'
import
*
as
Commander
from
"
commander
"
Yargs
.
usage
(
"
$0 [opts] <command> [args]
"
)
.
env
(
"
MICROJOURNAL
"
)
.
option
(
"
path
"
,
{
alias
:
"
p
"
,
default
:
joinPath
(
homedir
(),
"
.microjournal
"
),
type
:
"
string
"
,
describe
:
"
The path to the journal (defaults to ~/.microjournal
"
})
.
command
(
"
create <message>
"
,
"
creates a new journal entry
"
,
yargs
=>
yargs
.
positional
(
"
message
"
,
{
alias
:
"
m
"
,
type
:
"
string
"
,
describe
:
"
The message to post
"
})
.
positional
(
"
journal
"
,
{
alias
:
"
j
"
,
type
:
"
string
"
,
default
:
"
default
"
,
describe
:
"
The name of the journal (defaults to
\"
default
\"
)
"
})
.
demandOption
([
"
message
"
])
,
(
argv
:
{
[
key
:
string
]:
any
})
=>
{
const
accessor
=
new
FolderAccessor
(
argv
.
path
);
const
store
=
new
DataStore
(
accessor
);
const
createStore
=
()
=>
{
const
path
=
(
Commander
.
path
as
string
)
||
joinPath
(
homedir
(),
"
.microjournal
"
)
const
accessor
=
new
FolderAccessor
(
path
);
const
store
=
new
DataStore
(
accessor
);
return
store
}
Commander
.
version
(
"
0.0.1
"
)
.
option
(
"
-p, --path <path>
"
,
"
The path to the journal (defaults to ~/.microjournal)
"
)
.
option
(
"
-j, --journal <name>
"
,
"
The name of the journal (defaults to personal)
"
)
Commander
.
command
(
"
create <message>
"
)
.
description
(
"
creates a new journal entry
"
)
.
action
(
message
=>
{
const
journal
=
(
Commander
.
journal
as
string
)
||
"
personal
"
const
store
=
createStore
();
const
message
:
string
=
argv
.
message
const
journal
:
string
=
argv
.
journal
if
(
message
&&
journal
)
{
store
.
accessor
.
create
(
journal
,
{
...
...
@@ -46,12 +37,14 @@ Yargs
process
.
exit
(
1
)
}
});
}
}
})
.
command
(
"
journals
"
,
"
lists journals
"
,
yargs
=>
yargs
,
(
argv
:
{
[
key
:
string
]:
any
})
=>
{
const
accessor
=
new
FolderAccessor
(
argv
.
path
);
const
store
=
new
DataStore
(
accessor
);
Commander
.
command
(
"
journals
"
)
.
description
(
"
lists journals
"
)
.
action
(()
=>
{
const
store
=
createStore
();
store
.
accessor
.
listJournals
()
.
subscribe
({
next
:
j
=>
{
...
...
@@ -59,6 +52,30 @@ Yargs
}
})
})
Commander
.
command
(
"
list [journal]
"
)
.
description
(
"
lists the contents of the journal
"
)
.
action
(
journal
=>
{
const
store
=
createStore
()
if
(
journal
)
{
store
.
accessor
.
list
(
journal
)
.
subscribe
({
next
:
entry
=>
{
if
(
entry
.
date
)
{
console
.
log
(
""
+
entry
.
date
.
toLocaleDateString
()
+
"
"
+
entry
.
date
.
toLocaleTimeString
()
+
"
:
"
+
entry
.
data
.
message
)
}
else
{
console
.
log
(
""
+
entry
.
data
.
message
)
}
}
})
}
})
Commander
.
parse
(
process
.
argv
)
/*
.command("list [journal]", "lists the contents of the journal", yargs => yargs
.positional("journal", {
type: "string",
...
...
@@ -116,3 +133,4 @@ Yargs
})
.help()
.argv
*/
\ No newline at end of file
packages/cli/package-lock.json
View file @
b5da1cfb
...
...
@@ -2498,8 +2498,7 @@
"commander"
:
{
"version"
:
"2.19.0"
,
"resolved"
:
"https://registry.npmjs.org/commander/-/commander-2.19.0.tgz"
,
"integrity"
:
"sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg=="
,
"dev"
:
true
"integrity"
:
"sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg=="
},
"component-emitter"
:
{
"version"
:
"1.2.1"
,
...
...
@@ -7944,6 +7943,12 @@
"integrity"
:
"sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
,
"dev"
:
true
},
"typescript"
:
{
"version"
:
"3.2.2"
,
"resolved"
:
"https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz"
,
"integrity"
:
"sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg=="
,
"dev"
:
true
},
"unicode-canonical-property-names-ecmascript"
:
{
"version"
:
"1.0.4"
,
"resolved"
:
"https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz"
,
...
...
packages/cli/package.json
View file @
b5da1cfb
...
...
@@ -2,14 +2,14 @@
"name"
:
"@microjournal/cli"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"
parcel build index.ts
"
,
"build"
:
"
tsc -p .
"
,
"mj"
:
"ts-node index.ts"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
...
...
@@ -19,9 +19,11 @@
"dependencies"
:
{
"@microjournal/accessor-folder"
:
"1.0.0"
,
"@microjournal/data-store"
:
"1.0.0"
,
"commander"
:
"^2.19.0"
,
"yargs"
:
"^12.0.5"
},
"devDependencies"
:
{
"@types/node"
:
"^10.12.18"
,
"@types/yargs"
:
"^12.0.5"
,
"babel-core"
:
"^6.26.3"
,
"babel-plugin-transform-es2015-for-of"
:
"^6.23.0"
,
...
...
@@ -29,10 +31,11 @@
"babel-preset-es2015"
:
"^6.24.1"
,
"parcel-bundler"
:
"^1.11.0"
,
"parcel-plugin-shebang"
:
"^1.2.3"
,
"ts-node"
:
"^7.0.1"
"ts-node"
:
"^7.0.1"
,
"typescript"
:
"^3.2.2"
},
"bin"
:
{
"mj"
:
"
build
/index.js"
"mj"
:
"
lib
/index.js"
},
"engines"
:
{
"node"
:
"6"
...
...
packages/cli/tsconfig.json
View file @
b5da1cfb
{
"extends"
:
"../../tsconfig.json"
,
"compilerOptions"
:
{
"outDir"
:
"./lib"
"outDir"
:
"./lib"
,
"types"
:
[
"@types/node"
]
},
"include"
:
[
"./index.ts"
]
}
packages/data-store/package-lock.json
0 → 100644
View file @
b5da1cfb
{
"name"
:
"@microjournal/data-store"
,
"version"
:
"1.0.0"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
"@microjournal/accessor"
:
{
"version"
:
"1.0.0"
,
"requires"
:
{
"rxjs"
:
"6.3.3"
},
"dependencies"
:
{
"rxjs"
:
{
"version"
:
"6.3.3"
,
"bundled"
:
true
,
"requires"
:
{
"tslib"
:
"1.9.3"
}
},
"tslib"
:
{
"version"
:
"1.9.3"
,
"bundled"
:
true
}
}
},
"typescript"
:
{
"version"
:
"3.2.2"
,
"resolved"
:
"https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz"
,
"integrity"
:
"sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg=="
,
"dev"
:
true
}
}
}
packages/data-store/package.json
View file @
b5da1cfb
...
...
@@ -2,11 +2,14 @@
"name"
:
"@microjournal/data-store"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"tsc -p ."
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"keywords"
:
[],
...
...
@@ -14,5 +17,8 @@
"license"
:
"ISC"
,
"dependencies"
:
{
"@microjournal/accessor"
:
"1.0.0"
},
"devDependencies"
:
{
"typescript"
:
"^3.2.2"
}
}
packages/journal/package.json
View file @
b5da1cfb
...
...
@@ -2,11 +2,12 @@
"name"
:
"@microjournal/journal"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.
t
s"
,
"main"
:
"
lib/
index.
j
s"
,
"paths"
:
{
"@microjournal"
:
[
"packages"
]
},
"scripts"
:
{
"build"
:
"tsc -p ."
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"keywords"
:
[],
...
...
@@ -15,5 +16,8 @@
"dependencies"
:
{
"@microjournal/accessor"
:
"1.0.0"
,
"rxjs"
:
"^6.3.3"
},
"devDependencies"
:
{
"typescript"
:
"^3.2.2"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment