@zodmire/cli 0.1.0 → 0.1.1
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/mod.mjs +12 -0
- package/package.json +3 -3
package/mod.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { register } from "node:module";
|
|
1
2
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
3
|
import { fileURLToPath } from "node:url";
|
|
3
4
|
import { dirname, resolve } from "node:path";
|
|
@@ -209,6 +210,17 @@ async function runCompositionGenerate(compositionConfigPath, targetOverride, ver
|
|
|
209
210
|
|
|
210
211
|
//#endregion
|
|
211
212
|
//#region packages/cli/mod.ts
|
|
213
|
+
register(`data:text/javascript,${encodeURIComponent(`
|
|
214
|
+
const NPM_RE = /^npm:(@?[^@\\/]+(?:\\/[^@\\/]+)?)(?:@[^/]*)?(.*)$/;
|
|
215
|
+
export function resolve(specifier, context, nextResolve) {
|
|
216
|
+
const match = NPM_RE.exec(specifier);
|
|
217
|
+
if (match) {
|
|
218
|
+
const bare = match[1] + (match[2] || "");
|
|
219
|
+
return nextResolve(bare, context);
|
|
220
|
+
}
|
|
221
|
+
return nextResolve(specifier, context);
|
|
222
|
+
}
|
|
223
|
+
`)}`, import.meta.url);
|
|
212
224
|
function printUsage() {
|
|
213
225
|
console.log(`zodmire v${GENERATOR_VERSION}
|
|
214
226
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zodmire/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./mod.mjs",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@zodmire/config": "^0.1.
|
|
17
|
-
"@zodmire/core": "^0.1.
|
|
16
|
+
"@zodmire/config": "^0.1.1",
|
|
17
|
+
"@zodmire/core": "^0.1.1"
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
20
|
"zodmire": "./bin/zodmire.js"
|