@slicemachine/init 2.1.1-dev-hotfixes.0 → 2.1.1-dev-hotfixes.2
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/SliceMachineInitProcess.cjs +19 -14
- package/dist/SliceMachineInitProcess.cjs.map +1 -1
- package/dist/SliceMachineInitProcess.d.ts +1 -2
- package/dist/SliceMachineInitProcess.js +19 -14
- package/dist/SliceMachineInitProcess.js.map +1 -1
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs +2 -2
- package/dist/_node_modules/@babel/code-frame/lib/index.js +2 -2
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs +1 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js +1 -1
- package/dist/_node_modules/@babel/highlight/lib/index.cjs +3 -3
- package/dist/_node_modules/@babel/highlight/lib/index.js +3 -3
- package/dist/_node_modules/@nodelib/fs.scandir/out/index.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/index.js +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/async.js +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/providers/sync.js +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/settings.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.scandir/out/settings.js +1 -1
- package/dist/_node_modules/@nodelib/fs.stat/out/index.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.stat/out/index.js +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/index.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/index.js +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/async.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/async.js +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/sync.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/readers/sync.js +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/settings.cjs +1 -1
- package/dist/_node_modules/@nodelib/fs.walk/out/settings.js +1 -1
- package/dist/_node_modules/camelcase-keys/index.cjs +1 -1
- package/dist/_node_modules/camelcase-keys/index.js +1 -1
- package/dist/_node_modules/dir-glob/index.cjs +1 -1
- package/dist/_node_modules/dir-glob/index.js +1 -1
- package/dist/_node_modules/fast-glob/out/index.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/index.js +1 -1
- package/dist/_node_modules/fast-glob/out/managers/tasks.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/managers/tasks.js +1 -1
- package/dist/_node_modules/fast-glob/out/providers/filters/deep.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/providers/filters/deep.js +1 -1
- package/dist/_node_modules/fast-glob/out/providers/filters/entry.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/providers/filters/entry.js +1 -1
- package/dist/_node_modules/fast-glob/out/providers/filters/error.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/providers/filters/error.js +1 -1
- package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/providers/matchers/matcher.js +1 -1
- package/dist/_node_modules/fast-glob/out/providers/transformers/entry.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/providers/transformers/entry.js +1 -1
- package/dist/_node_modules/fast-glob/out/readers/async.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/readers/async.js +1 -1
- package/dist/_node_modules/fast-glob/out/readers/reader.cjs +2 -2
- package/dist/_node_modules/fast-glob/out/readers/reader.js +2 -2
- package/dist/_node_modules/fast-glob/out/readers/stream.cjs +2 -2
- package/dist/_node_modules/fast-glob/out/readers/stream.js +2 -2
- package/dist/_node_modules/fast-glob/out/readers/sync.cjs +2 -2
- package/dist/_node_modules/fast-glob/out/readers/sync.js +2 -2
- package/dist/_node_modules/fast-glob/out/utils/index.cjs +1 -1
- package/dist/_node_modules/fast-glob/out/utils/index.js +1 -1
- package/dist/_node_modules/js-tokens/index.cjs +1 -1
- package/dist/_node_modules/js-tokens/index.js +1 -1
- package/dist/_node_modules/lines-and-columns/build/index.cjs +1 -1
- package/dist/_node_modules/lines-and-columns/build/index.js +1 -1
- package/dist/_node_modules/map-obj/index.cjs +1 -1
- package/dist/_node_modules/map-obj/index.js +1 -1
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs +1 -1
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js +1 -1
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs +1 -1
- package/dist/_node_modules/meow/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js +1 -1
- package/dist/_node_modules/micromatch/index.cjs +1 -1
- package/dist/_node_modules/micromatch/index.js +1 -1
- package/dist/_node_modules/parse-json/index.cjs +2 -2
- package/dist/_node_modules/parse-json/index.js +2 -2
- package/dist/_node_modules/path-type/index.cjs +1 -1
- package/dist/_node_modules/path-type/index.js +1 -1
- package/dist/_node_modules/picomatch/index.cjs +1 -1
- package/dist/_node_modules/picomatch/index.js +1 -1
- package/dist/_virtual/index10.cjs +2 -2
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index11.cjs +2 -2
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index12.cjs +2 -2
- package/dist/_virtual/index12.js +6 -6
- package/dist/_virtual/index13.cjs +10 -2
- package/dist/_virtual/index13.cjs.map +1 -1
- package/dist/_virtual/index13.js +11 -2
- package/dist/_virtual/index13.js.map +1 -1
- package/dist/_virtual/index14.cjs +2 -10
- package/dist/_virtual/index14.cjs.map +1 -1
- package/dist/_virtual/index14.js +2 -11
- package/dist/_virtual/index14.js.map +1 -1
- package/dist/_virtual/index15.cjs +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.cjs +2 -2
- package/dist/_virtual/index16.js +2 -2
- package/dist/_virtual/index17.cjs +2 -2
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index4.cjs +2 -10
- package/dist/_virtual/index4.cjs.map +1 -1
- package/dist/_virtual/index4.js +2 -11
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/_virtual/index5.cjs +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.cjs +10 -2
- package/dist/_virtual/index6.cjs.map +1 -1
- package/dist/_virtual/index6.js +11 -2
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/_virtual/index8.cjs +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/index9.cjs +2 -2
- package/dist/_virtual/index9.js +2 -2
- package/dist/packages/init/package.json.cjs +4 -4
- package/dist/packages/init/package.json.js +4 -4
- package/package.json +4 -4
- package/src/SliceMachineInitProcess.ts +21 -20
- package/dist/lib/starters.cjs +0 -23
- package/dist/lib/starters.cjs.map +0 -1
- package/dist/lib/starters.js +0 -23
- package/dist/lib/starters.js.map +0 -1
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var mapObj = {
|
|
3
|
-
get exports() {
|
|
4
|
-
return mapObjExports;
|
|
5
|
-
},
|
|
6
|
-
set exports(v) {
|
|
7
|
-
mapObjExports = v;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
1
|
+
var utils = {};
|
|
10
2
|
export {
|
|
11
|
-
|
|
12
|
-
mapObjExports as exports
|
|
3
|
+
utils as __exports
|
|
13
4
|
};
|
|
14
5
|
//# sourceMappingURL=index4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/_virtual/index5.cjs
CHANGED
package/dist/_virtual/index5.js
CHANGED
package/dist/_virtual/index6.cjs
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
exports.exports = {};
|
|
4
|
+
var mapObj = {
|
|
5
|
+
get exports() {
|
|
6
|
+
return exports.exports;
|
|
7
|
+
},
|
|
8
|
+
set exports(v) {
|
|
9
|
+
exports.exports = v;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.__module = mapObj;
|
|
5
13
|
//# sourceMappingURL=index6.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index6.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
var
|
|
1
|
+
var mapObjExports = {};
|
|
2
|
+
var mapObj = {
|
|
3
|
+
get exports() {
|
|
4
|
+
return mapObjExports;
|
|
5
|
+
},
|
|
6
|
+
set exports(v) {
|
|
7
|
+
mapObjExports = v;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
mapObj as __module,
|
|
12
|
+
mapObjExports as exports
|
|
4
13
|
};
|
|
5
14
|
//# sourceMappingURL=index6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/_virtual/index8.cjs
CHANGED
package/dist/_virtual/index8.js
CHANGED
package/dist/_virtual/index9.cjs
CHANGED
package/dist/_virtual/index9.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const name = "@slicemachine/init";
|
|
4
|
-
const version = "2.1.1-dev-hotfixes.
|
|
4
|
+
const version = "2.1.1-dev-hotfixes.2";
|
|
5
5
|
const description = "Init Prismic Slice Machine in your project";
|
|
6
6
|
const keywords = [
|
|
7
7
|
"typescript",
|
|
@@ -54,7 +54,7 @@ const scripts = {
|
|
|
54
54
|
const dependencies = {
|
|
55
55
|
"@antfu/ni": "^0.20.0",
|
|
56
56
|
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
57
|
-
"@slicemachine/manager": "0.3.1-dev-hotfixes.
|
|
57
|
+
"@slicemachine/manager": "0.3.1-dev-hotfixes.2",
|
|
58
58
|
chalk: "^4.1.2",
|
|
59
59
|
globby: "^13.1.3",
|
|
60
60
|
listr: "^0.14.3",
|
|
@@ -66,7 +66,7 @@ const dependencies = {
|
|
|
66
66
|
};
|
|
67
67
|
const devDependencies = {
|
|
68
68
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
69
|
-
"@slicemachine/plugin-kit": "0.3.1-dev-hotfixes.
|
|
69
|
+
"@slicemachine/plugin-kit": "0.3.1-dev-hotfixes.2",
|
|
70
70
|
"@types/listr": "^0.14.4",
|
|
71
71
|
"@types/prompts": "^2.4.3",
|
|
72
72
|
"@types/semver": "^7.3.13",
|
|
@@ -92,7 +92,7 @@ const devDependencies = {
|
|
|
92
92
|
"vite-plugin-sdk": "^0.1.1",
|
|
93
93
|
vitest: "^0.27.3"
|
|
94
94
|
};
|
|
95
|
-
const gitHead = "
|
|
95
|
+
const gitHead = "7728667e91790de6be5e8341607b1f70b3f55546";
|
|
96
96
|
const pkg = {
|
|
97
97
|
name,
|
|
98
98
|
version,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const name = "@slicemachine/init";
|
|
2
|
-
const version = "2.1.1-dev-hotfixes.
|
|
2
|
+
const version = "2.1.1-dev-hotfixes.2";
|
|
3
3
|
const description = "Init Prismic Slice Machine in your project";
|
|
4
4
|
const keywords = [
|
|
5
5
|
"typescript",
|
|
@@ -52,7 +52,7 @@ const scripts = {
|
|
|
52
52
|
const dependencies = {
|
|
53
53
|
"@antfu/ni": "^0.20.0",
|
|
54
54
|
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
55
|
-
"@slicemachine/manager": "0.3.1-dev-hotfixes.
|
|
55
|
+
"@slicemachine/manager": "0.3.1-dev-hotfixes.2",
|
|
56
56
|
chalk: "^4.1.2",
|
|
57
57
|
globby: "^13.1.3",
|
|
58
58
|
listr: "^0.14.3",
|
|
@@ -64,7 +64,7 @@ const dependencies = {
|
|
|
64
64
|
};
|
|
65
65
|
const devDependencies = {
|
|
66
66
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
67
|
-
"@slicemachine/plugin-kit": "0.3.1-dev-hotfixes.
|
|
67
|
+
"@slicemachine/plugin-kit": "0.3.1-dev-hotfixes.2",
|
|
68
68
|
"@types/listr": "^0.14.4",
|
|
69
69
|
"@types/prompts": "^2.4.3",
|
|
70
70
|
"@types/semver": "^7.3.13",
|
|
@@ -90,7 +90,7 @@ const devDependencies = {
|
|
|
90
90
|
"vite-plugin-sdk": "^0.1.1",
|
|
91
91
|
vitest: "^0.27.3"
|
|
92
92
|
};
|
|
93
|
-
const gitHead = "
|
|
93
|
+
const gitHead = "7728667e91790de6be5e8341607b1f70b3f55546";
|
|
94
94
|
const pkg = {
|
|
95
95
|
name,
|
|
96
96
|
version,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slicemachine/init",
|
|
3
|
-
"version": "2.1.1-dev-hotfixes.
|
|
3
|
+
"version": "2.1.1-dev-hotfixes.2",
|
|
4
4
|
"description": "Init Prismic Slice Machine in your project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@antfu/ni": "^0.20.0",
|
|
55
55
|
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
56
|
-
"@slicemachine/manager": "0.3.1-dev-hotfixes.
|
|
56
|
+
"@slicemachine/manager": "0.3.1-dev-hotfixes.2",
|
|
57
57
|
"chalk": "^4.1.2",
|
|
58
58
|
"globby": "^13.1.3",
|
|
59
59
|
"listr": "^0.14.3",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
68
|
-
"@slicemachine/plugin-kit": "0.3.1-dev-hotfixes.
|
|
68
|
+
"@slicemachine/plugin-kit": "0.3.1-dev-hotfixes.2",
|
|
69
69
|
"@types/listr": "^0.14.4",
|
|
70
70
|
"@types/prompts": "^2.4.3",
|
|
71
71
|
"@types/semver": "^7.3.13",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"vite-plugin-sdk": "^0.1.1",
|
|
92
92
|
"vitest": "^0.27.3"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "7728667e91790de6be5e8341607b1f70b3f55546"
|
|
95
95
|
}
|
|
@@ -13,12 +13,10 @@ import {
|
|
|
13
13
|
PrismicRepository,
|
|
14
14
|
SliceMachineManager,
|
|
15
15
|
PackageManager,
|
|
16
|
-
StarterID,
|
|
17
16
|
} from "@slicemachine/manager";
|
|
18
17
|
|
|
19
18
|
import pkg from "../package.json";
|
|
20
19
|
import { detectFramework, Framework } from "./lib/framework";
|
|
21
|
-
import { detectStarterId } from "./lib/starters";
|
|
22
20
|
import { getRunScriptCommand } from "./lib/getRunScriptCommand";
|
|
23
21
|
import { getExecuteCommand } from "./lib/getExecuteCommand";
|
|
24
22
|
import {
|
|
@@ -68,7 +66,8 @@ type SliceMachineInitProcessContext = {
|
|
|
68
66
|
projectInitialization?: {
|
|
69
67
|
patchedScript?: boolean;
|
|
70
68
|
};
|
|
71
|
-
|
|
69
|
+
// TODO(DT-1386): Handle starter detection for Segment
|
|
70
|
+
// starterID?: StarterID;
|
|
72
71
|
};
|
|
73
72
|
|
|
74
73
|
export class SliceMachineInitProcess {
|
|
@@ -271,22 +270,23 @@ export class SliceMachineInitProcess {
|
|
|
271
270
|
)}`;
|
|
272
271
|
},
|
|
273
272
|
},
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
},
|
|
273
|
+
// TODO(DT-1386): Handle starter detection for Segment
|
|
274
|
+
// {
|
|
275
|
+
// title: "Detecting starter...",
|
|
276
|
+
// task: async (_, task) => {
|
|
277
|
+
// this.context.starterID = await detectStarterId(
|
|
278
|
+
// this.manager.cwd,
|
|
279
|
+
// );
|
|
280
|
+
|
|
281
|
+
// if (this.context.starterID) {
|
|
282
|
+
// task.title = `Detected starter ${chalk.cyan(
|
|
283
|
+
// this.context.starterID,
|
|
284
|
+
// )}`;
|
|
285
|
+
// } else {
|
|
286
|
+
// task.title = "No starter detected";
|
|
287
|
+
// }
|
|
288
|
+
// },
|
|
289
|
+
// },
|
|
290
290
|
]),
|
|
291
291
|
},
|
|
292
292
|
]);
|
|
@@ -703,7 +703,8 @@ ${chalk.cyan("?")} Your Prismic repository name`.replace("\n", ""),
|
|
|
703
703
|
await this.manager.prismicRepository.create({
|
|
704
704
|
domain: this.context.repository.domain,
|
|
705
705
|
framework: this.context.framework.wroomTelemetryID,
|
|
706
|
-
|
|
706
|
+
// TODO(DT-1386): Handle starter detection for Segment
|
|
707
|
+
// starterID: this.context.starterID,
|
|
707
708
|
});
|
|
708
709
|
|
|
709
710
|
this.context.repository.exists = true;
|
package/dist/lib/starters.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fs = require("node:fs/promises");
|
|
4
|
-
const path = require("node:path");
|
|
5
|
-
const STARTERS_REPOSITORY_NAME_TO_ID = {
|
|
6
|
-
"nextjs-starter-prismic-multi-page": "next_multi_page",
|
|
7
|
-
"nextjs-starter-prismic-blog": "next_blog",
|
|
8
|
-
"nextjs-starter-prismic-multi-language": "next_multi_lang",
|
|
9
|
-
"nuxt-starter-prismic-multi-page": "nuxt_multi_page",
|
|
10
|
-
"nuxt-starter-prismic-blog": "nuxt_blog",
|
|
11
|
-
"nuxt-starter-prismic-multi-language": "nuxt_multi_lang"
|
|
12
|
-
};
|
|
13
|
-
const detectStarterId = async (cwd) => {
|
|
14
|
-
const path$1 = path.join(cwd, "package.json");
|
|
15
|
-
try {
|
|
16
|
-
const pkg = JSON.parse(await fs.readFile(path$1, "utf-8"));
|
|
17
|
-
return STARTERS_REPOSITORY_NAME_TO_ID[pkg.name];
|
|
18
|
-
} catch (error) {
|
|
19
|
-
throw new Error(`Failed to read project's \`package.json\` at \`${path$1}\``, { cause: error });
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.detectStarterId = detectStarterId;
|
|
23
|
-
//# sourceMappingURL=starters.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"starters.cjs","sources":["../../../src/lib/starters.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport { StarterID } from \"@slicemachine/manager\";\n\nconst STARTERS_REPOSITORY_NAME_TO_ID: Record<string, StarterID> = {\n\t\"nextjs-starter-prismic-multi-page\": \"next_multi_page\",\n\t\"nextjs-starter-prismic-blog\": \"next_blog\",\n\t\"nextjs-starter-prismic-multi-language\": \"next_multi_lang\",\n\t\"nuxt-starter-prismic-multi-page\": \"nuxt_multi_page\",\n\t\"nuxt-starter-prismic-blog\": \"nuxt_blog\",\n\t\"nuxt-starter-prismic-multi-language\": \"nuxt_multi_lang\",\n};\n\nexport const detectStarterId = async (\n\tcwd: string,\n): Promise<StarterID | undefined> => {\n\tconst path = join(cwd, \"package.json\");\n\n\ttry {\n\t\tconst pkg = JSON.parse(await readFile(path, \"utf-8\"));\n\n\t\treturn STARTERS_REPOSITORY_NAME_TO_ID[pkg.name];\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Failed to read project's \\`package.json\\` at \\`${path}\\``,\n\t\t\t{ cause: error },\n\t\t);\n\t}\n};\n"],"names":["path","join","readFile"],"mappings":";;;;AAKA,MAAM,iCAA4D;AAAA,EACjE,qCAAqC;AAAA,EACrC,+BAA+B;AAAA,EAC/B,yCAAyC;AAAA,EACzC,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,uCAAuC;;AAG3B,MAAA,kBAAkB,OAC9B,QACmC;AAC7B,QAAAA,SAAOC,KAAAA,KAAK,KAAK,cAAc;AAEjC,MAAA;AACH,UAAM,MAAM,KAAK,MAAM,MAAMC,GAAAA,SAASF,QAAM,OAAO,CAAC;AAE7C,WAAA,+BAA+B,IAAI,IAAI;AAAA,WACtC;AACR,UAAM,IAAI,MACT,kDAAkDA,YAClD,EAAE,OAAO,OAAO;AAAA,EAEjB;AACF;;"}
|
package/dist/lib/starters.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
const STARTERS_REPOSITORY_NAME_TO_ID = {
|
|
4
|
-
"nextjs-starter-prismic-multi-page": "next_multi_page",
|
|
5
|
-
"nextjs-starter-prismic-blog": "next_blog",
|
|
6
|
-
"nextjs-starter-prismic-multi-language": "next_multi_lang",
|
|
7
|
-
"nuxt-starter-prismic-multi-page": "nuxt_multi_page",
|
|
8
|
-
"nuxt-starter-prismic-blog": "nuxt_blog",
|
|
9
|
-
"nuxt-starter-prismic-multi-language": "nuxt_multi_lang"
|
|
10
|
-
};
|
|
11
|
-
const detectStarterId = async (cwd) => {
|
|
12
|
-
const path = join(cwd, "package.json");
|
|
13
|
-
try {
|
|
14
|
-
const pkg = JSON.parse(await readFile(path, "utf-8"));
|
|
15
|
-
return STARTERS_REPOSITORY_NAME_TO_ID[pkg.name];
|
|
16
|
-
} catch (error) {
|
|
17
|
-
throw new Error(`Failed to read project's \`package.json\` at \`${path}\``, { cause: error });
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
detectStarterId
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=starters.js.map
|
package/dist/lib/starters.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"starters.js","sources":["../../../src/lib/starters.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport { StarterID } from \"@slicemachine/manager\";\n\nconst STARTERS_REPOSITORY_NAME_TO_ID: Record<string, StarterID> = {\n\t\"nextjs-starter-prismic-multi-page\": \"next_multi_page\",\n\t\"nextjs-starter-prismic-blog\": \"next_blog\",\n\t\"nextjs-starter-prismic-multi-language\": \"next_multi_lang\",\n\t\"nuxt-starter-prismic-multi-page\": \"nuxt_multi_page\",\n\t\"nuxt-starter-prismic-blog\": \"nuxt_blog\",\n\t\"nuxt-starter-prismic-multi-language\": \"nuxt_multi_lang\",\n};\n\nexport const detectStarterId = async (\n\tcwd: string,\n): Promise<StarterID | undefined> => {\n\tconst path = join(cwd, \"package.json\");\n\n\ttry {\n\t\tconst pkg = JSON.parse(await readFile(path, \"utf-8\"));\n\n\t\treturn STARTERS_REPOSITORY_NAME_TO_ID[pkg.name];\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Failed to read project's \\`package.json\\` at \\`${path}\\``,\n\t\t\t{ cause: error },\n\t\t);\n\t}\n};\n"],"names":[],"mappings":";;AAKA,MAAM,iCAA4D;AAAA,EACjE,qCAAqC;AAAA,EACrC,+BAA+B;AAAA,EAC/B,yCAAyC;AAAA,EACzC,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,uCAAuC;;AAG3B,MAAA,kBAAkB,OAC9B,QACmC;AAC7B,QAAA,OAAO,KAAK,KAAK,cAAc;AAEjC,MAAA;AACH,UAAM,MAAM,KAAK,MAAM,MAAM,SAAS,MAAM,OAAO,CAAC;AAE7C,WAAA,+BAA+B,IAAI,IAAI;AAAA,WACtC;AACR,UAAM,IAAI,MACT,kDAAkD,UAClD,EAAE,OAAO,OAAO;AAAA,EAEjB;AACF;"}
|