@worldware/msg-cli 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DBC2Y6VQ.mjs → chunk-AT7DHQF7.mjs} +6 -6
- package/dist/{chunk-4Q2252JQ.mjs → chunk-BRZS5LYD.mjs} +2 -2
- package/dist/{chunk-KKYCVD5M.mjs → chunk-T4ENP5TS.mjs} +1 -1
- package/dist/commands/create/project.mjs +3 -3
- package/dist/commands/create/resource.mjs +2 -2
- package/dist/commands/init.cjs +6 -6
- package/dist/commands/init.mjs +1 -1
- package/dist/lib/create-project-helpers.mjs +3 -3
- package/dist/lib/create-resource-helpers.mjs +2 -2
- package/dist/lib/init-helpers.cjs +6 -6
- package/dist/lib/init-helpers.mjs +1 -1
- package/package.json +2 -2
|
@@ -116,8 +116,8 @@ function addDirectoriesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
|
116
116
|
function addImportAliasesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
117
117
|
const imports = {
|
|
118
118
|
...pkg.imports,
|
|
119
|
-
"#i18n/*":
|
|
120
|
-
"#l10n/*":
|
|
119
|
+
"#i18n/*": `./${i18nDir}/*`,
|
|
120
|
+
"#l10n/*": `./${l10nDir}/*`,
|
|
121
121
|
"#root/*": "./*"
|
|
122
122
|
};
|
|
123
123
|
return { ...pkg, imports };
|
|
@@ -125,8 +125,8 @@ function addImportAliasesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
|
125
125
|
function addScriptsToPackageJson(pkg) {
|
|
126
126
|
const scripts = {
|
|
127
127
|
...pkg.scripts,
|
|
128
|
-
"i18n-export": "msg export
|
|
129
|
-
"l10n-import": "msg import
|
|
128
|
+
"i18n-export": "msg export resources",
|
|
129
|
+
"l10n-import": "msg import translations"
|
|
130
130
|
};
|
|
131
131
|
return { ...pkg, scripts };
|
|
132
132
|
}
|
|
@@ -143,8 +143,8 @@ function addTsconfigPaths(tsconfigPath, i18nDir, l10nDir) {
|
|
|
143
143
|
co.baseUrl = co.baseUrl ?? ".";
|
|
144
144
|
co.paths = {
|
|
145
145
|
...co.paths,
|
|
146
|
-
"#i18n/*": [
|
|
147
|
-
"#l10n/*": [
|
|
146
|
+
"#i18n/*": [`./${i18nDir}/*`],
|
|
147
|
+
"#l10n/*": [`./${l10nDir}/*`],
|
|
148
148
|
"#root/*": ["./*"]
|
|
149
149
|
};
|
|
150
150
|
writeFileSync(tsconfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dynamicImportFromUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T4ENP5TS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
loadPackageJsonForMsg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AT7DHQF7.mjs";
|
|
7
7
|
|
|
8
8
|
// src/lib/create-project-helpers.ts
|
|
9
9
|
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
importMsgProjectFile,
|
|
4
4
|
loadPackageJsonForCreateProject,
|
|
5
5
|
writeMsgProjectFile
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-BRZS5LYD.mjs";
|
|
7
|
+
import "../../chunk-T4ENP5TS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
findPackageJsonPath
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-AT7DHQF7.mjs";
|
|
11
11
|
|
|
12
12
|
// src/commands/create/project.ts
|
|
13
13
|
import { Args, Command, Flags } from "@oclif/core";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
importMsgProjectForResource,
|
|
5
5
|
readPackageJsonForCreateResource,
|
|
6
6
|
writeMsgResourceFile
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-T4ENP5TS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
findPackageJsonPath
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-AT7DHQF7.mjs";
|
|
11
11
|
|
|
12
12
|
// src/commands/create/resource.ts
|
|
13
13
|
import { Args, Command, Flags } from "@oclif/core";
|
package/dist/commands/init.cjs
CHANGED
|
@@ -113,8 +113,8 @@ function addDirectoriesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
|
113
113
|
function addImportAliasesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
114
114
|
const imports = {
|
|
115
115
|
...pkg.imports,
|
|
116
|
-
"#i18n/*":
|
|
117
|
-
"#l10n/*":
|
|
116
|
+
"#i18n/*": `./${i18nDir}/*`,
|
|
117
|
+
"#l10n/*": `./${l10nDir}/*`,
|
|
118
118
|
"#root/*": "./*"
|
|
119
119
|
};
|
|
120
120
|
return { ...pkg, imports };
|
|
@@ -122,8 +122,8 @@ function addImportAliasesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
|
122
122
|
function addScriptsToPackageJson(pkg) {
|
|
123
123
|
const scripts = {
|
|
124
124
|
...pkg.scripts,
|
|
125
|
-
"i18n-export": "msg export
|
|
126
|
-
"l10n-import": "msg import
|
|
125
|
+
"i18n-export": "msg export resources",
|
|
126
|
+
"l10n-import": "msg import translations"
|
|
127
127
|
};
|
|
128
128
|
return { ...pkg, scripts };
|
|
129
129
|
}
|
|
@@ -140,8 +140,8 @@ function addTsconfigPaths(tsconfigPath, i18nDir, l10nDir) {
|
|
|
140
140
|
co.baseUrl = co.baseUrl ?? ".";
|
|
141
141
|
co.paths = {
|
|
142
142
|
...co.paths,
|
|
143
|
-
"#i18n/*": [
|
|
144
|
-
"#l10n/*": [
|
|
143
|
+
"#i18n/*": [`./${i18nDir}/*`],
|
|
144
|
+
"#l10n/*": [`./${l10nDir}/*`],
|
|
145
145
|
"#root/*": ["./*"]
|
|
146
146
|
};
|
|
147
147
|
(0, import_fs.writeFileSync)(tsconfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
package/dist/commands/init.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
importMsgProjectFile,
|
|
4
4
|
loadPackageJsonForCreateProject,
|
|
5
5
|
writeMsgProjectFile
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-BRZS5LYD.mjs";
|
|
7
|
+
import "../chunk-T4ENP5TS.mjs";
|
|
8
|
+
import "../chunk-AT7DHQF7.mjs";
|
|
9
9
|
export {
|
|
10
10
|
calculateRelativePath,
|
|
11
11
|
importMsgProjectFile,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
importMsgProjectForResource,
|
|
5
5
|
readPackageJsonForCreateResource,
|
|
6
6
|
writeMsgResourceFile
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-T4ENP5TS.mjs";
|
|
8
|
+
import "../chunk-AT7DHQF7.mjs";
|
|
9
9
|
export {
|
|
10
10
|
dynamicImportFromUrl,
|
|
11
11
|
generateMsgResourceContent,
|
|
@@ -152,8 +152,8 @@ function addDirectoriesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
|
152
152
|
function addImportAliasesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
153
153
|
const imports = {
|
|
154
154
|
...pkg.imports,
|
|
155
|
-
"#i18n/*":
|
|
156
|
-
"#l10n/*":
|
|
155
|
+
"#i18n/*": `./${i18nDir}/*`,
|
|
156
|
+
"#l10n/*": `./${l10nDir}/*`,
|
|
157
157
|
"#root/*": "./*"
|
|
158
158
|
};
|
|
159
159
|
return { ...pkg, imports };
|
|
@@ -161,8 +161,8 @@ function addImportAliasesToPackageJson(pkg, i18nDir, l10nDir) {
|
|
|
161
161
|
function addScriptsToPackageJson(pkg) {
|
|
162
162
|
const scripts = {
|
|
163
163
|
...pkg.scripts,
|
|
164
|
-
"i18n-export": "msg export
|
|
165
|
-
"l10n-import": "msg import
|
|
164
|
+
"i18n-export": "msg export resources",
|
|
165
|
+
"l10n-import": "msg import translations"
|
|
166
166
|
};
|
|
167
167
|
return { ...pkg, scripts };
|
|
168
168
|
}
|
|
@@ -179,8 +179,8 @@ function addTsconfigPaths(tsconfigPath, i18nDir, l10nDir) {
|
|
|
179
179
|
co.baseUrl = co.baseUrl ?? ".";
|
|
180
180
|
co.paths = {
|
|
181
181
|
...co.paths,
|
|
182
|
-
"#i18n/*": [
|
|
183
|
-
"#l10n/*": [
|
|
182
|
+
"#i18n/*": [`./${i18nDir}/*`],
|
|
183
|
+
"#l10n/*": [`./${l10nDir}/*`],
|
|
184
184
|
"#root/*": ["./*"]
|
|
185
185
|
};
|
|
186
186
|
(0, import_fs.writeFileSync)(tsconfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldware/msg-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "CLI for msg library",
|
|
5
5
|
"main": "dist/commands/init.cjs",
|
|
6
6
|
"module": "dist/commands/init.mjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@oclif/core": "^4.8.0",
|
|
34
|
-
"@worldware/msg": "^0.6.
|
|
34
|
+
"@worldware/msg": "^0.6.1",
|
|
35
35
|
"fast-xml-parser": "^5.3.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|