@prismicio/cli 0.0.3-beta.12 → 0.0.3-beta.13
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/{cli-orR365ka.js → cli-DDs8_xoz.js} +128 -489
- package/dist/{cli-orR365ka.js.map → cli-DDs8_xoz.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/core/framework.d.ts +2 -3
- package/dist/{index-B8Jc4vYC.js → index-_sNPxHKB.js} +2 -2
- package/dist/{index-B8Jc4vYC.js.map → index-_sNPxHKB.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{multipart-parser-pPf53n-l.js → multipart-parser-BFd74IrK.js} +2 -2
- package/dist/{multipart-parser-pPf53n-l.js.map → multipart-parser-BFd74IrK.js.map} +1 -1
- package/package.json +5 -6
- package/src/core/framework.ts +2 -12
|
@@ -2515,7 +2515,7 @@ class Body {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
return formData;
|
|
2517
2517
|
}
|
|
2518
|
-
const { toFormData } = await import("./multipart-parser-
|
|
2518
|
+
const { toFormData } = await import("./multipart-parser-BFd74IrK.js");
|
|
2519
2519
|
return toFormData(this.body, ct2);
|
|
2520
2520
|
}
|
|
2521
2521
|
/**
|
|
@@ -5742,7 +5742,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
5742
5742
|
payload.issues.push(issue(_iss));
|
|
5743
5743
|
}
|
|
5744
5744
|
}
|
|
5745
|
-
var _a$
|
|
5745
|
+
var _a$4;
|
|
5746
5746
|
class $ZodRegistry {
|
|
5747
5747
|
constructor() {
|
|
5748
5748
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -5789,7 +5789,7 @@ class $ZodRegistry {
|
|
|
5789
5789
|
function registry() {
|
|
5790
5790
|
return new $ZodRegistry();
|
|
5791
5791
|
}
|
|
5792
|
-
(_a$
|
|
5792
|
+
(_a$4 = globalThis).__zod_globalRegistry ?? (_a$4.__zod_globalRegistry = registry());
|
|
5793
5793
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
5794
5794
|
function _string(Class, params) {
|
|
5795
5795
|
return new Class({
|
|
@@ -7401,8 +7401,8 @@ class PrismicAuthManager {
|
|
|
7401
7401
|
const createPrismicAuthManager = (args) => {
|
|
7402
7402
|
return new PrismicAuthManager(args);
|
|
7403
7403
|
};
|
|
7404
|
-
var __defProp$
|
|
7405
|
-
var __defNormalProp$2 = (obj, key2, value) => key2 in obj ? __defProp$
|
|
7404
|
+
var __defProp$8 = Object.defineProperty;
|
|
7405
|
+
var __defNormalProp$2 = (obj, key2, value) => key2 in obj ? __defProp$8(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
7406
7406
|
var __publicField$2 = (obj, key2, value) => {
|
|
7407
7407
|
__defNormalProp$2(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
|
7408
7408
|
return value;
|
|
@@ -7440,8 +7440,8 @@ class BulkUpdateHasExistingDocumentsError extends PrismicError2 {
|
|
|
7440
7440
|
}
|
|
7441
7441
|
class MissingFetchError extends Error {
|
|
7442
7442
|
}
|
|
7443
|
-
var __defProp$
|
|
7444
|
-
var __defNormalProp$1 = (obj, key2, value) => key2 in obj ? __defProp$
|
|
7443
|
+
var __defProp$7 = Object.defineProperty;
|
|
7444
|
+
var __defNormalProp$1 = (obj, key2, value) => key2 in obj ? __defProp$7(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
7445
7445
|
var __publicField$1 = (obj, key2, value) => {
|
|
7446
7446
|
__defNormalProp$1(obj, key2 + "", value);
|
|
7447
7447
|
return value;
|
|
@@ -7530,8 +7530,8 @@ class BulkUpdateTransaction {
|
|
|
7530
7530
|
});
|
|
7531
7531
|
}
|
|
7532
7532
|
}
|
|
7533
|
-
var __defProp$
|
|
7534
|
-
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp$
|
|
7533
|
+
var __defProp$6 = Object.defineProperty;
|
|
7534
|
+
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp$6(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
7535
7535
|
var __publicField = (obj, key2, value) => {
|
|
7536
7536
|
__defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
|
7537
7537
|
return value;
|
|
@@ -37200,10 +37200,10 @@ new TemplateTag$1(inlineArrayTransformer, stripIndentTransformer$1, trimResultTr
|
|
|
37200
37200
|
new TemplateTag$1(inlineArrayTransformer, replaceResultTransformer(/(?:\s+)/g, " "), trimResultTransformer$1);
|
|
37201
37201
|
var stripIndent$2 = new TemplateTag$1(stripIndentTransformer$1, trimResultTransformer$1);
|
|
37202
37202
|
new TemplateTag$1(stripIndentTransformer$1("all"), trimResultTransformer$1);
|
|
37203
|
-
var __defProp$
|
|
37203
|
+
var __defProp$5 = Object.defineProperty;
|
|
37204
37204
|
var __export$1 = (target, all) => {
|
|
37205
37205
|
for (var name2 in all)
|
|
37206
|
-
__defProp$
|
|
37206
|
+
__defProp$5(target, name2, { get: all[name2], enumerable: true });
|
|
37207
37207
|
};
|
|
37208
37208
|
var public_exports$1 = {};
|
|
37209
37209
|
__export$1(public_exports$1, {
|
|
@@ -38542,7 +38542,7 @@ const require$3 = createRequire(import.meta.url);
|
|
|
38542
38542
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
38543
38543
|
dirname$1(__filename$1);
|
|
38544
38544
|
var __create$1 = Object.create;
|
|
38545
|
-
var __defProp$
|
|
38545
|
+
var __defProp$4 = Object.defineProperty;
|
|
38546
38546
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
38547
38547
|
var __getOwnPropNames$1 = Object.getOwnPropertyNames;
|
|
38548
38548
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
@@ -38558,13 +38558,13 @@ var __commonJS$1 = (cb, mod) => function __require2() {
|
|
|
38558
38558
|
};
|
|
38559
38559
|
var __export = (target, all) => {
|
|
38560
38560
|
for (var name2 in all)
|
|
38561
|
-
__defProp$
|
|
38561
|
+
__defProp$4(target, name2, { get: all[name2], enumerable: true });
|
|
38562
38562
|
};
|
|
38563
38563
|
var __copyProps$1 = (to, from, except, desc) => {
|
|
38564
38564
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
38565
38565
|
for (let key2 of __getOwnPropNames$1(from))
|
|
38566
38566
|
if (!__hasOwnProp$1.call(to, key2) && key2 !== except)
|
|
38567
|
-
__defProp$
|
|
38567
|
+
__defProp$4(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc$1(from, key2)) || desc.enumerable });
|
|
38568
38568
|
}
|
|
38569
38569
|
return to;
|
|
38570
38570
|
};
|
|
@@ -38573,7 +38573,7 @@ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(
|
|
|
38573
38573
|
// file that has been converted to a CommonJS file using a Babel-
|
|
38574
38574
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38575
38575
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
38576
|
-
__defProp$
|
|
38576
|
+
__defProp$4(target, "default", { value: mod, enumerable: true }),
|
|
38577
38577
|
mod
|
|
38578
38578
|
));
|
|
38579
38579
|
var require_array = __commonJS$1({
|
|
@@ -60883,7 +60883,7 @@ const resolveCommand = (command) => {
|
|
|
60883
60883
|
}
|
|
60884
60884
|
return [command.command, ...command.args].join(" ");
|
|
60885
60885
|
};
|
|
60886
|
-
const installDependencies$
|
|
60886
|
+
const installDependencies$3 = async (args) => {
|
|
60887
60887
|
const commandArgs = Object.entries(args.dependencies).map(([pkg2, range2]) => `${pkg2}@${range2}`);
|
|
60888
60888
|
if (commandArgs.length && args.dev) {
|
|
60889
60889
|
commandArgs.unshift("-D");
|
|
@@ -61128,7 +61128,7 @@ Error Message: ${error22.message}`);
|
|
|
61128
61128
|
};
|
|
61129
61129
|
try {
|
|
61130
61130
|
const projectRoot = await this.getRoot();
|
|
61131
|
-
const { execaProcess } = await installDependencies$
|
|
61131
|
+
const { execaProcess } = await installDependencies$3({
|
|
61132
61132
|
packageManager,
|
|
61133
61133
|
dependencies: args.dependencies,
|
|
61134
61134
|
dev: args.dev,
|
|
@@ -70607,7 +70607,7 @@ const fetch = async (...args) => {
|
|
|
70607
70607
|
if (globalThis.fetch) {
|
|
70608
70608
|
return globalThis.fetch(...args);
|
|
70609
70609
|
} else if (typeof EdgeRuntime !== "string") {
|
|
70610
|
-
return (await import("./index-
|
|
70610
|
+
return (await import("./index-_sNPxHKB.js")).default(...args);
|
|
70611
70611
|
} else {
|
|
70612
70612
|
throw new Error("Invariant: an edge runtime that does not support fetch should not exist");
|
|
70613
70613
|
}
|
|
@@ -74123,9 +74123,9 @@ function sanitizeKey(key2) {
|
|
|
74123
74123
|
function stripQuotes(val) {
|
|
74124
74124
|
return typeof val === "string" && (val[0] === "'" || val[0] === '"') && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val;
|
|
74125
74125
|
}
|
|
74126
|
-
var _a$
|
|
74126
|
+
var _a$3, _b$3, _c$1;
|
|
74127
74127
|
const minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 20;
|
|
74128
|
-
const nodeVersion = (_b$3 = (_a$
|
|
74128
|
+
const nodeVersion = (_b$3 = (_a$3 = process === null || process === void 0 ? void 0 : process.versions) === null || _a$3 === void 0 ? void 0 : _a$3.node) !== null && _b$3 !== void 0 ? _b$3 : (_c$1 = process === null || process === void 0 ? void 0 : process.version) === null || _c$1 === void 0 ? void 0 : _c$1.slice(1);
|
|
74129
74129
|
if (nodeVersion) {
|
|
74130
74130
|
const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
|
|
74131
74131
|
if (major < minNodeVersion) {
|
|
@@ -82518,8 +82518,8 @@ const meow = (helpText, options8 = {}) => {
|
|
|
82518
82518
|
process$1.title = result.pkg.bin ? Object.keys(result.pkg.bin).at(0) : result.pkg.name;
|
|
82519
82519
|
return result;
|
|
82520
82520
|
};
|
|
82521
|
-
const name$
|
|
82522
|
-
const version$k = "0.0.3-beta.
|
|
82521
|
+
const name$3 = "@prismicio/cli";
|
|
82522
|
+
const version$k = "0.0.3-beta.13";
|
|
82523
82523
|
const description = "Prismic CLI";
|
|
82524
82524
|
const keywords = ["typescript", "prismic"];
|
|
82525
82525
|
const repository = { "type": "git", "url": "git+https://github.com/prismicio/devtools.git" };
|
|
@@ -82535,10 +82535,10 @@ const files = ["bin", "dist", "src", "README.md"];
|
|
|
82535
82535
|
const engines = { "node": ">=20.19.0" };
|
|
82536
82536
|
const publishConfig = { "access": "public" };
|
|
82537
82537
|
const scripts = { "build": "vite build", "dev": "vite build --watch", "types": "tsc --noEmit", "format": "prettier --write .", "lint": "eslint --max-warnings 0 .", "prepack": "$npm_execpath run build", "depcheck": "depcheck --config=.depcheckrc", "audit": "yarn npm audit --environment production --severity high" };
|
|
82538
|
-
const devDependencies = { "@eslint/js": "9.39.1", "@prismicio/adapter-next": "workspace:*", "@prismicio/adapter-nuxt": "workspace:*", "@prismicio/adapter-
|
|
82538
|
+
const devDependencies = { "@eslint/js": "9.39.1", "@prismicio/adapter-next": "workspace:*", "@prismicio/adapter-nuxt": "workspace:*", "@prismicio/adapter-sveltekit": "workspace:*", "@prismicio/manager": "workspace:*", "@sentry/node": "10.28.0", "@trivago/prettier-plugin-sort-imports": "6.0.0", "@types/semver": "7.7.1", "chalk": "5.6.2", "depcheck": "1.4.7", "eslint": "9.39.1", "eslint-config-prettier": "10.1.8", "eslint-plugin-tsdoc": "0.5.0", "listr2": "9.0.5", "meow": "14.0.0", "open": "11.0.0", "prettier": "3.7.4", "prettier-plugin-jsdoc": "1.7.0", "semver": "7.7.3", "typescript": "5.9.3", "typescript-eslint": "8.48.1", "vite": "7.2.6", "vite-plugin-sdk": "0.1.5", "zod": "4.1.13" };
|
|
82539
82539
|
const stableVersion = "0.0.2";
|
|
82540
82540
|
const _package = {
|
|
82541
|
-
name: name$
|
|
82541
|
+
name: name$3,
|
|
82542
82542
|
version: version$k,
|
|
82543
82543
|
description,
|
|
82544
82544
|
keywords,
|
|
@@ -82572,7 +82572,7 @@ const pkg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
82572
82572
|
license,
|
|
82573
82573
|
main,
|
|
82574
82574
|
module: module$1,
|
|
82575
|
-
name: name$
|
|
82575
|
+
name: name$3,
|
|
82576
82576
|
publishConfig,
|
|
82577
82577
|
repository,
|
|
82578
82578
|
scripts,
|
|
@@ -119148,13 +119148,13 @@ const checkHasProjectFile = async (args) => {
|
|
|
119148
119148
|
const filePath = args.helpers.joinPathFromRoot(args.filename);
|
|
119149
119149
|
return checkPathExists(filePath);
|
|
119150
119150
|
};
|
|
119151
|
-
const NON_EDITABLE_FILE_BANNER$
|
|
119151
|
+
const NON_EDITABLE_FILE_BANNER$3 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
119152
119152
|
const CUSTOM_TYPES_LIBRARY_DIRNAME = "customtypes";
|
|
119153
119153
|
const CUSTOM_TYPE_MODEL_FILENAME = "index.json";
|
|
119154
119154
|
const SHARED_SLICE_MODEL_FILENAME = "model.json";
|
|
119155
119155
|
const TSCONFIG_FILENAME = "tsconfig.json";
|
|
119156
119156
|
const GLOBAL_TYPESCRIPT_TYPES_FILENAME = "prismicio-types.d.ts";
|
|
119157
|
-
const checkIsTypeScriptProject$
|
|
119157
|
+
const checkIsTypeScriptProject$3 = async (args) => {
|
|
119158
119158
|
return checkHasProjectFile({
|
|
119159
119159
|
...args,
|
|
119160
119160
|
filename: TSCONFIG_FILENAME
|
|
@@ -119508,14 +119508,14 @@ function pascalCaseTransform$1(input, index2) {
|
|
|
119508
119508
|
function pascalCaseTransformMerge$1(input) {
|
|
119509
119509
|
return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
|
119510
119510
|
}
|
|
119511
|
-
function pascalCase$
|
|
119511
|
+
function pascalCase$5(input, options8) {
|
|
119512
119512
|
if (options8 === void 0) {
|
|
119513
119513
|
options8 = {};
|
|
119514
119514
|
}
|
|
119515
119515
|
return noCase$1(input, __assign$1({ delimiter: "", transform: pascalCaseTransform$1 }, options8));
|
|
119516
119516
|
}
|
|
119517
119517
|
const buildTypeName = (...parts) => {
|
|
119518
|
-
let name2 = pascalCase$
|
|
119518
|
+
let name2 = pascalCase$5(parts.filter(Boolean).join(" "), {
|
|
119519
119519
|
transform: pascalCaseTransformMerge$1
|
|
119520
119520
|
});
|
|
119521
119521
|
if (/^[0-9]/.test(name2) ? "_" : "") {
|
|
@@ -120430,7 +120430,7 @@ const upsertGlobalTypeScriptTypes = async (args) => {
|
|
|
120430
120430
|
},
|
|
120431
120431
|
typesProvider: await detectTypesProvider({ cwd: project.root })
|
|
120432
120432
|
});
|
|
120433
|
-
contents = `${NON_EDITABLE_FILE_BANNER$
|
|
120433
|
+
contents = `${NON_EDITABLE_FILE_BANNER$3}
|
|
120434
120434
|
|
|
120435
120435
|
${contents}`;
|
|
120436
120436
|
return await writeProjectFile({
|
|
@@ -120498,14 +120498,14 @@ function pascalCaseTransform(input, index2) {
|
|
|
120498
120498
|
function pascalCaseTransformMerge(input) {
|
|
120499
120499
|
return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
|
120500
120500
|
}
|
|
120501
|
-
function pascalCase$
|
|
120501
|
+
function pascalCase$4(input, options8) {
|
|
120502
120502
|
if (options8 === void 0) {
|
|
120503
120503
|
options8 = {};
|
|
120504
120504
|
}
|
|
120505
120505
|
return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options8));
|
|
120506
120506
|
}
|
|
120507
|
-
const pascalCase$
|
|
120508
|
-
return pascalCase$
|
|
120507
|
+
const pascalCase$3 = (...input) => {
|
|
120508
|
+
return pascalCase$4(input.filter(Boolean).join(" "), {
|
|
120509
120509
|
transform: pascalCaseTransformMerge
|
|
120510
120510
|
});
|
|
120511
120511
|
};
|
|
@@ -120521,7 +120521,7 @@ async function resolveSliceModel(args) {
|
|
|
120521
120521
|
}
|
|
120522
120522
|
const buildSliceDirectoryPath = async (args) => {
|
|
120523
120523
|
const model = await resolveSliceModel(args);
|
|
120524
|
-
return path$1.join(buildSliceLibraryDirectoryPath(args), pascalCase$
|
|
120524
|
+
return path$1.join(buildSliceLibraryDirectoryPath(args), pascalCase$3(model.name));
|
|
120525
120525
|
};
|
|
120526
120526
|
const buildSliceFilePath = async (args) => {
|
|
120527
120527
|
return path$1.join(await buildSliceDirectoryPath(args), args.filename);
|
|
@@ -122926,7 +122926,7 @@ const deleteCustomTypeDirectory = async (args) => {
|
|
|
122926
122926
|
});
|
|
122927
122927
|
return dir;
|
|
122928
122928
|
};
|
|
122929
|
-
const name$
|
|
122929
|
+
const name$2 = "@prismicio/adapter-next";
|
|
122930
122930
|
function getDefaultExportFromCjs(x2) {
|
|
122931
122931
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
122932
122932
|
}
|
|
@@ -124881,11 +124881,11 @@ async function checkHasAppRouter(args) {
|
|
|
124881
124881
|
helpers: args.helpers
|
|
124882
124882
|
});
|
|
124883
124883
|
}
|
|
124884
|
-
const checkIsTypeScriptProject$
|
|
124885
|
-
return args.options.typescript ?? checkIsTypeScriptProject$
|
|
124884
|
+
const checkIsTypeScriptProject$2 = async (args) => {
|
|
124885
|
+
return args.options.typescript ?? checkIsTypeScriptProject$3({ helpers: args.helpers });
|
|
124886
124886
|
};
|
|
124887
|
-
const getJSFileExtension$
|
|
124888
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
124887
|
+
const getJSFileExtension$2 = async ({ helpers, options: options8, jsx = false }) => {
|
|
124888
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$2({
|
|
124889
124889
|
helpers,
|
|
124890
124890
|
options: options8
|
|
124891
124891
|
});
|
|
@@ -124912,24 +124912,24 @@ const getNextJSVersion = async () => {
|
|
|
124912
124912
|
const { version: version2 } = JSON.parse(await readFile2(packageJSONPath, "utf8"));
|
|
124913
124913
|
return version2;
|
|
124914
124914
|
};
|
|
124915
|
-
const rejectIfNecessary$
|
|
124915
|
+
const rejectIfNecessary$2 = (promiseSettledResults) => {
|
|
124916
124916
|
const rejectedReasons = promiseSettledResults.filter((result) => result.status === "rejected").map((result) => result.reason);
|
|
124917
124917
|
if (rejectedReasons.length > 0) {
|
|
124918
124918
|
throw rejectedReasons[0];
|
|
124919
124919
|
}
|
|
124920
124920
|
};
|
|
124921
|
-
const NON_EDITABLE_FILE_BANNER$
|
|
124922
|
-
const pascalCase$
|
|
124923
|
-
return pascalCase$
|
|
124921
|
+
const NON_EDITABLE_FILE_BANNER$2 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
124922
|
+
const pascalCase$2 = (...input) => {
|
|
124923
|
+
return pascalCase$5(input.filter(Boolean).join(" "));
|
|
124924
124924
|
};
|
|
124925
|
-
const upsertSliceLibraryIndexFile$
|
|
124925
|
+
const upsertSliceLibraryIndexFile$2 = async (args) => {
|
|
124926
124926
|
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
124927
124927
|
libraryID: args.libraryID
|
|
124928
124928
|
});
|
|
124929
124929
|
let contents;
|
|
124930
124930
|
if (args.options.lazyLoadSlices) {
|
|
124931
124931
|
contents = stripIndent$2`
|
|
124932
|
-
${NON_EDITABLE_FILE_BANNER$
|
|
124932
|
+
${NON_EDITABLE_FILE_BANNER$2}
|
|
124933
124933
|
|
|
124934
124934
|
import dynamic from 'next/dynamic'
|
|
124935
124935
|
|
|
@@ -124947,7 +124947,7 @@ const upsertSliceLibraryIndexFile$3 = async (args) => {
|
|
|
124947
124947
|
`;
|
|
124948
124948
|
} else {
|
|
124949
124949
|
contents = stripIndent$2`
|
|
124950
|
-
${NON_EDITABLE_FILE_BANNER$
|
|
124950
|
+
${NON_EDITABLE_FILE_BANNER$2}
|
|
124951
124951
|
|
|
124952
124952
|
${(await Promise.all(slices2.map(async (slice2) => {
|
|
124953
124953
|
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
@@ -124955,20 +124955,20 @@ const upsertSliceLibraryIndexFile$3 = async (args) => {
|
|
|
124955
124955
|
helpers: args.helpers,
|
|
124956
124956
|
libraryID: args.libraryID
|
|
124957
124957
|
}));
|
|
124958
|
-
const componentName = pascalCase$
|
|
124958
|
+
const componentName = pascalCase$2(slice2.model.name);
|
|
124959
124959
|
return `import ${componentName} from "./${dirName}";`;
|
|
124960
124960
|
}))).join("\n")}
|
|
124961
124961
|
|
|
124962
124962
|
export const components = {
|
|
124963
124963
|
${slices2.map((slice2) => {
|
|
124964
124964
|
const id2 = slice2.model.id;
|
|
124965
|
-
const componentName = pascalCase$
|
|
124965
|
+
const componentName = pascalCase$2(slice2.model.name);
|
|
124966
124966
|
return `${id2}: ${componentName},`;
|
|
124967
124967
|
}).join("\n")}
|
|
124968
124968
|
}
|
|
124969
124969
|
`;
|
|
124970
124970
|
}
|
|
124971
|
-
const extension = await getJSFileExtension$
|
|
124971
|
+
const extension = await getJSFileExtension$2({
|
|
124972
124972
|
helpers: args.helpers,
|
|
124973
124973
|
options: args.options
|
|
124974
124974
|
});
|
|
@@ -124983,7 +124983,7 @@ const upsertSliceLibraryIndexFile$3 = async (args) => {
|
|
|
124983
124983
|
helpers: args.helpers
|
|
124984
124984
|
});
|
|
124985
124985
|
};
|
|
124986
|
-
const installDependencies$
|
|
124986
|
+
const installDependencies$2 = async ({ installDependencies: installDependencies2 }) => {
|
|
124987
124987
|
await installDependencies2({
|
|
124988
124988
|
dependencies: {
|
|
124989
124989
|
"@prismicio/client": "latest",
|
|
@@ -124993,7 +124993,7 @@ const installDependencies$3 = async ({ installDependencies: installDependencies2
|
|
|
124993
124993
|
});
|
|
124994
124994
|
};
|
|
124995
124995
|
const createPrismicIOFile$1 = async ({ helpers, options: options8 }) => {
|
|
124996
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
124996
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$2({
|
|
124997
124997
|
helpers,
|
|
124998
124998
|
options: options8
|
|
124999
124999
|
});
|
|
@@ -125002,7 +125002,7 @@ const createPrismicIOFile$1 = async ({ helpers, options: options8 }) => {
|
|
|
125002
125002
|
helpers
|
|
125003
125003
|
});
|
|
125004
125004
|
const hasAppRouter = await checkHasAppRouter({ helpers });
|
|
125005
|
-
const extension = await getJSFileExtension$
|
|
125005
|
+
const extension = await getJSFileExtension$2({ helpers, options: options8 });
|
|
125006
125006
|
const filename = await buildSrcPath$1({
|
|
125007
125007
|
filename: `prismicio.${extension}`,
|
|
125008
125008
|
helpers
|
|
@@ -125184,11 +125184,11 @@ const createPrismicIOFile$1 = async ({ helpers, options: options8 }) => {
|
|
|
125184
125184
|
};
|
|
125185
125185
|
const createPreviewRoute = async ({ helpers, options: options8 }) => {
|
|
125186
125186
|
const hasAppRouter = await checkHasAppRouter({ helpers });
|
|
125187
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
125187
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$2({
|
|
125188
125188
|
helpers,
|
|
125189
125189
|
options: options8
|
|
125190
125190
|
});
|
|
125191
|
-
const extension = await getJSFileExtension$
|
|
125191
|
+
const extension = await getJSFileExtension$2({ helpers, options: options8 });
|
|
125192
125192
|
const filename = await buildSrcPath$1({
|
|
125193
125193
|
filename: hasAppRouter ? `app/api/preview/route.${extension}` : `pages/api/preview.${extension}`,
|
|
125194
125194
|
helpers
|
|
@@ -125265,11 +125265,11 @@ const createPreviewRoute = async ({ helpers, options: options8 }) => {
|
|
|
125265
125265
|
};
|
|
125266
125266
|
const createExitPreviewRoute = async ({ helpers, options: options8 }) => {
|
|
125267
125267
|
const hasAppRouter = await checkHasAppRouter({ helpers });
|
|
125268
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
125268
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$2({
|
|
125269
125269
|
helpers,
|
|
125270
125270
|
options: options8
|
|
125271
125271
|
});
|
|
125272
|
-
const extension = await getJSFileExtension$
|
|
125272
|
+
const extension = await getJSFileExtension$2({ helpers, options: options8 });
|
|
125273
125273
|
const filename = await buildSrcPath$1({
|
|
125274
125274
|
filename: hasAppRouter ? `app/api/exit-preview/route.${extension}` : `pages/api/exit-preview.${extension}`,
|
|
125275
125275
|
helpers
|
|
@@ -125313,7 +125313,7 @@ const createExitPreviewRoute = async ({ helpers, options: options8 }) => {
|
|
|
125313
125313
|
helpers
|
|
125314
125314
|
});
|
|
125315
125315
|
};
|
|
125316
|
-
const modifyPrismicConfig$
|
|
125316
|
+
const modifyPrismicConfig$2 = async ({ helpers, options: options8, actions }) => {
|
|
125317
125317
|
const hasSrcDirectory = await checkHasProjectFile({
|
|
125318
125318
|
filename: "src",
|
|
125319
125319
|
helpers
|
|
@@ -125338,7 +125338,7 @@ const createRevalidateRoute = async ({ helpers, options: options8 }) => {
|
|
|
125338
125338
|
}
|
|
125339
125339
|
const nextJSVersion = await getNextJSVersion();
|
|
125340
125340
|
const supportsCacheLife = semver.gte(nextJSVersion, "16.0.0-beta.0");
|
|
125341
|
-
const extension = await getJSFileExtension$
|
|
125341
|
+
const extension = await getJSFileExtension$2({ helpers, options: options8 });
|
|
125342
125342
|
const filename = await buildSrcPath$1({
|
|
125343
125343
|
filename: `app/api/revalidate/route.${extension}`,
|
|
125344
125344
|
helpers
|
|
@@ -125369,13 +125369,13 @@ const upsertSliceLibraryIndexFiles$1 = async (context2) => {
|
|
|
125369
125369
|
return;
|
|
125370
125370
|
}
|
|
125371
125371
|
await Promise.all(project.config.libraries.map(async (libraryID) => {
|
|
125372
|
-
await upsertSliceLibraryIndexFile$
|
|
125372
|
+
await upsertSliceLibraryIndexFile$2({ libraryID, ...context2 });
|
|
125373
125373
|
}));
|
|
125374
125374
|
};
|
|
125375
|
-
const projectInit$
|
|
125376
|
-
rejectIfNecessary$
|
|
125377
|
-
installDependencies$
|
|
125378
|
-
modifyPrismicConfig$
|
|
125375
|
+
const projectInit$2 = async ({ installDependencies: _installDependencies }, context2) => {
|
|
125376
|
+
rejectIfNecessary$2(await Promise.allSettled([
|
|
125377
|
+
installDependencies$2({ installDependencies: _installDependencies }),
|
|
125378
|
+
modifyPrismicConfig$2(context2),
|
|
125379
125379
|
createPrismicIOFile$1(context2),
|
|
125380
125380
|
createPreviewRoute(context2),
|
|
125381
125381
|
createExitPreviewRoute(context2),
|
|
@@ -125383,12 +125383,12 @@ const projectInit$3 = async ({ installDependencies: _installDependencies }, cont
|
|
|
125383
125383
|
]));
|
|
125384
125384
|
await upsertSliceLibraryIndexFiles$1(context2);
|
|
125385
125385
|
};
|
|
125386
|
-
const createComponentFile$
|
|
125387
|
-
const extension = await getJSFileExtension$
|
|
125386
|
+
const createComponentFile$2 = async ({ data, helpers, actions, options: options8 }) => {
|
|
125387
|
+
const extension = await getJSFileExtension$2({ helpers, options: options8, jsx: true });
|
|
125388
125388
|
const filename = `index.${extension}`;
|
|
125389
|
-
const pascalName = pascalCase$
|
|
125389
|
+
const pascalName = pascalCase$2(data.model.name);
|
|
125390
125390
|
let contents;
|
|
125391
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
125391
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$2({
|
|
125392
125392
|
helpers,
|
|
125393
125393
|
options: options8
|
|
125394
125394
|
});
|
|
@@ -125460,18 +125460,18 @@ const createComponentFile$3 = async ({ data, helpers, actions, options: options8
|
|
|
125460
125460
|
helpers
|
|
125461
125461
|
});
|
|
125462
125462
|
};
|
|
125463
|
-
const sliceCreate$
|
|
125464
|
-
rejectIfNecessary$
|
|
125463
|
+
const sliceCreate$2 = async (data, context2) => {
|
|
125464
|
+
rejectIfNecessary$2(await Promise.allSettled([
|
|
125465
125465
|
writeSliceModel({
|
|
125466
125466
|
libraryID: data.libraryID,
|
|
125467
125467
|
model: data.model,
|
|
125468
125468
|
format: context2.options.format,
|
|
125469
125469
|
helpers: context2.helpers
|
|
125470
125470
|
}),
|
|
125471
|
-
createComponentFile$
|
|
125471
|
+
createComponentFile$2({ data, ...context2 })
|
|
125472
125472
|
]));
|
|
125473
|
-
rejectIfNecessary$
|
|
125474
|
-
upsertSliceLibraryIndexFile$
|
|
125473
|
+
rejectIfNecessary$2(await Promise.allSettled([
|
|
125474
|
+
upsertSliceLibraryIndexFile$2({
|
|
125475
125475
|
libraryID: data.libraryID,
|
|
125476
125476
|
...context2
|
|
125477
125477
|
}),
|
|
@@ -125483,17 +125483,17 @@ const sliceCreate$3 = async (data, context2) => {
|
|
|
125483
125483
|
})
|
|
125484
125484
|
]));
|
|
125485
125485
|
};
|
|
125486
|
-
const plugin$
|
|
125486
|
+
const plugin$2 = definePlugin({
|
|
125487
125487
|
meta: {
|
|
125488
|
-
name: name$
|
|
125488
|
+
name: name$2
|
|
125489
125489
|
},
|
|
125490
125490
|
defaultOptions: {
|
|
125491
125491
|
format: true,
|
|
125492
125492
|
lazyLoadSlices: true
|
|
125493
125493
|
},
|
|
125494
125494
|
setup({ hook }) {
|
|
125495
|
-
hook("project:init", projectInit$
|
|
125496
|
-
hook("slice:create", sliceCreate$
|
|
125495
|
+
hook("project:init", projectInit$2);
|
|
125496
|
+
hook("slice:create", sliceCreate$2);
|
|
125497
125497
|
hook("slice:update", async (data, context2) => {
|
|
125498
125498
|
await writeSliceModel({
|
|
125499
125499
|
libraryID: data.libraryID,
|
|
@@ -125513,8 +125513,8 @@ const plugin$3 = definePlugin({
|
|
|
125513
125513
|
format: context2.options.format,
|
|
125514
125514
|
...context2
|
|
125515
125515
|
});
|
|
125516
|
-
rejectIfNecessary$
|
|
125517
|
-
upsertSliceLibraryIndexFile$
|
|
125516
|
+
rejectIfNecessary$2(await Promise.allSettled([
|
|
125517
|
+
upsertSliceLibraryIndexFile$2({
|
|
125518
125518
|
libraryID: data.libraryID,
|
|
125519
125519
|
...context2
|
|
125520
125520
|
}),
|
|
@@ -125531,8 +125531,8 @@ const plugin$3 = definePlugin({
|
|
|
125531
125531
|
model: data.model,
|
|
125532
125532
|
...context2
|
|
125533
125533
|
});
|
|
125534
|
-
rejectIfNecessary$
|
|
125535
|
-
upsertSliceLibraryIndexFile$
|
|
125534
|
+
rejectIfNecessary$2(await Promise.allSettled([
|
|
125535
|
+
upsertSliceLibraryIndexFile$2({
|
|
125536
125536
|
libraryID: data.libraryID,
|
|
125537
125537
|
...context2
|
|
125538
125538
|
}),
|
|
@@ -125616,7 +125616,7 @@ const plugin$3 = definePlugin({
|
|
|
125616
125616
|
});
|
|
125617
125617
|
}
|
|
125618
125618
|
});
|
|
125619
|
-
const name$
|
|
125619
|
+
const name$1 = "@prismicio/adapter-nuxt";
|
|
125620
125620
|
var lib = {};
|
|
125621
125621
|
var hasRequiredLib;
|
|
125622
125622
|
function requireLib() {
|
|
@@ -140255,7 +140255,7 @@ function requireLib() {
|
|
|
140255
140255
|
}
|
|
140256
140256
|
var libExports = requireLib();
|
|
140257
140257
|
var __create = Object.create;
|
|
140258
|
-
var __defProp$
|
|
140258
|
+
var __defProp$3 = Object.defineProperty;
|
|
140259
140259
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
140260
140260
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
140261
140261
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -140266,14 +140266,14 @@ var __commonJS = (cb, mod) => function() {
|
|
|
140266
140266
|
var __copyProps = (to, from, except, desc) => {
|
|
140267
140267
|
if (from && typeof from === "object" || typeof from === "function") for (var keys2 = __getOwnPropNames(from), i2 = 0, n$4 = keys2.length, key2; i2 < n$4; i2++) {
|
|
140268
140268
|
key2 = keys2[i2];
|
|
140269
|
-
if (!__hasOwnProp.call(to, key2) && key2 !== except) __defProp$
|
|
140269
|
+
if (!__hasOwnProp.call(to, key2) && key2 !== except) __defProp$3(to, key2, {
|
|
140270
140270
|
get: ((k) => from[k]).bind(null, key2),
|
|
140271
140271
|
enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable
|
|
140272
140272
|
});
|
|
140273
140273
|
}
|
|
140274
140274
|
return to;
|
|
140275
140275
|
};
|
|
140276
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(!mod || !mod.__esModule ? __defProp$
|
|
140276
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(!mod || !mod.__esModule ? __defProp$3(target, "default", {
|
|
140277
140277
|
value: mod,
|
|
140278
140278
|
enumerable: true
|
|
140279
140279
|
}) : target, mod));
|
|
@@ -148153,22 +148153,22 @@ async function buildSrcPath(args) {
|
|
|
148153
148153
|
}
|
|
148154
148154
|
return args.filename;
|
|
148155
148155
|
}
|
|
148156
|
-
const rejectIfNecessary$
|
|
148156
|
+
const rejectIfNecessary$1 = (promiseSettledResults) => {
|
|
148157
148157
|
const rejectedReasons = promiseSettledResults.filter((result) => result.status === "rejected").map((result) => result.reason);
|
|
148158
148158
|
if (rejectedReasons.length > 0) {
|
|
148159
148159
|
throw rejectedReasons[0];
|
|
148160
148160
|
}
|
|
148161
148161
|
};
|
|
148162
|
-
const NUXT_PRISMIC
|
|
148163
|
-
const installDependencies$
|
|
148162
|
+
const NUXT_PRISMIC = "@nuxtjs/prismic";
|
|
148163
|
+
const installDependencies$1 = async ({ installDependencies: installDependencies2 }) => {
|
|
148164
148164
|
await installDependencies2({
|
|
148165
148165
|
dependencies: {
|
|
148166
|
-
[NUXT_PRISMIC
|
|
148166
|
+
[NUXT_PRISMIC]: "^4.0.0"
|
|
148167
148167
|
},
|
|
148168
148168
|
dev: true
|
|
148169
148169
|
});
|
|
148170
148170
|
};
|
|
148171
|
-
const configurePrismicModule
|
|
148171
|
+
const configurePrismicModule = async ({ helpers }) => {
|
|
148172
148172
|
let nuxtConfigFilename = "nuxt.config.js";
|
|
148173
148173
|
if (!await checkHasProjectFile({ filename: nuxtConfigFilename, helpers })) {
|
|
148174
148174
|
nuxtConfigFilename = "nuxt.config.ts";
|
|
@@ -148182,16 +148182,16 @@ const configurePrismicModule$1 = async ({ helpers }) => {
|
|
|
148182
148182
|
let hasInlinedConfiguration = false;
|
|
148183
148183
|
const hasPrismicModuleRegistered = (config2.modules || []).find((registration) => {
|
|
148184
148184
|
if (typeof registration === "string") {
|
|
148185
|
-
return registration === NUXT_PRISMIC
|
|
148185
|
+
return registration === NUXT_PRISMIC;
|
|
148186
148186
|
} else if (Array.isArray(registration)) {
|
|
148187
148187
|
hasInlinedConfiguration = !!registration[1];
|
|
148188
|
-
return registration[0] === NUXT_PRISMIC
|
|
148188
|
+
return registration[0] === NUXT_PRISMIC;
|
|
148189
148189
|
}
|
|
148190
148190
|
return false;
|
|
148191
148191
|
});
|
|
148192
148192
|
if (!hasPrismicModuleRegistered) {
|
|
148193
148193
|
config2.modules ||= [];
|
|
148194
|
-
config2.modules.push(NUXT_PRISMIC
|
|
148194
|
+
config2.modules.push(NUXT_PRISMIC);
|
|
148195
148195
|
}
|
|
148196
148196
|
if (!hasInlinedConfiguration) {
|
|
148197
148197
|
mod.imports.$add({
|
|
@@ -148237,7 +148237,7 @@ const moveOrDeleteAppVue = async ({ helpers, options: options8 }) => {
|
|
|
148237
148237
|
helpers
|
|
148238
148238
|
});
|
|
148239
148239
|
};
|
|
148240
|
-
const modifyPrismicConfig$
|
|
148240
|
+
const modifyPrismicConfig$1 = async ({ helpers, options: options8, actions }) => {
|
|
148241
148241
|
const hasAppDirectory = await checkHasProjectFile({
|
|
148242
148242
|
filename: "app",
|
|
148243
148243
|
helpers
|
|
@@ -148259,36 +148259,36 @@ const modifyPrismicConfig$2 = async ({ helpers, options: options8, actions }) =>
|
|
|
148259
148259
|
format: options8.format
|
|
148260
148260
|
});
|
|
148261
148261
|
};
|
|
148262
|
-
const projectInit$
|
|
148263
|
-
rejectIfNecessary$
|
|
148264
|
-
installDependencies$
|
|
148265
|
-
configurePrismicModule
|
|
148262
|
+
const projectInit$1 = async ({ installDependencies: _installDependencies }, context2) => {
|
|
148263
|
+
rejectIfNecessary$1(await Promise.allSettled([
|
|
148264
|
+
installDependencies$1({ installDependencies: _installDependencies }),
|
|
148265
|
+
configurePrismicModule(context2),
|
|
148266
148266
|
moveOrDeleteAppVue(context2),
|
|
148267
|
-
modifyPrismicConfig$
|
|
148267
|
+
modifyPrismicConfig$1(context2)
|
|
148268
148268
|
]));
|
|
148269
148269
|
};
|
|
148270
|
-
const checkIsTypeScriptProject$
|
|
148271
|
-
return args.options.typescript ?? checkIsTypeScriptProject$
|
|
148270
|
+
const checkIsTypeScriptProject$1 = async (args) => {
|
|
148271
|
+
return args.options.typescript ?? checkIsTypeScriptProject$3({ helpers: args.helpers });
|
|
148272
148272
|
};
|
|
148273
|
-
const pascalCase$
|
|
148274
|
-
return pascalCase$
|
|
148273
|
+
const pascalCase$1 = (...input) => {
|
|
148274
|
+
return pascalCase$5(input.filter(Boolean).join(" "));
|
|
148275
148275
|
};
|
|
148276
|
-
const NON_EDITABLE_FILE_BANNER$
|
|
148277
|
-
const getJSFileExtension$
|
|
148278
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
148276
|
+
const NON_EDITABLE_FILE_BANNER$1 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
148277
|
+
const getJSFileExtension$1 = async ({ helpers, options: options8 }) => {
|
|
148278
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$1({
|
|
148279
148279
|
helpers,
|
|
148280
148280
|
options: options8
|
|
148281
148281
|
});
|
|
148282
148282
|
return isTypeScriptProject ? "ts" : "js";
|
|
148283
148283
|
};
|
|
148284
|
-
const upsertSliceLibraryIndexFile$
|
|
148284
|
+
const upsertSliceLibraryIndexFile$1 = async (args) => {
|
|
148285
148285
|
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
148286
148286
|
libraryID: args.libraryID
|
|
148287
148287
|
});
|
|
148288
148288
|
let contents;
|
|
148289
148289
|
if (args.options.lazyLoadSlices) {
|
|
148290
148290
|
contents = stripIndent$2`
|
|
148291
|
-
${NON_EDITABLE_FILE_BANNER$
|
|
148291
|
+
${NON_EDITABLE_FILE_BANNER$1}
|
|
148292
148292
|
|
|
148293
148293
|
import { defineAsyncComponent } from "vue";
|
|
148294
148294
|
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
@@ -148307,7 +148307,7 @@ const upsertSliceLibraryIndexFile$2 = async (args) => {
|
|
|
148307
148307
|
`;
|
|
148308
148308
|
} else {
|
|
148309
148309
|
contents = stripIndent$2`
|
|
148310
|
-
${NON_EDITABLE_FILE_BANNER$
|
|
148310
|
+
${NON_EDITABLE_FILE_BANNER$1}
|
|
148311
148311
|
|
|
148312
148312
|
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
148313
148313
|
|
|
@@ -148317,20 +148317,20 @@ const upsertSliceLibraryIndexFile$2 = async (args) => {
|
|
|
148317
148317
|
helpers: args.helpers,
|
|
148318
148318
|
libraryID: args.libraryID
|
|
148319
148319
|
}));
|
|
148320
|
-
const componentName = pascalCase$
|
|
148320
|
+
const componentName = pascalCase$1(slice2.model.name);
|
|
148321
148321
|
return `import ${componentName} from "./${dirName}/index.vue";`;
|
|
148322
148322
|
}))).join("\n")}
|
|
148323
148323
|
|
|
148324
148324
|
export const components = defineSliceZoneComponents({
|
|
148325
148325
|
${slices2.map((slice2) => {
|
|
148326
148326
|
const id2 = slice2.model.id;
|
|
148327
|
-
const componentName = pascalCase$
|
|
148327
|
+
const componentName = pascalCase$1(slice2.model.name);
|
|
148328
148328
|
return `${id2}: ${componentName}`;
|
|
148329
148329
|
}).join(",\n")}
|
|
148330
148330
|
});
|
|
148331
148331
|
`;
|
|
148332
148332
|
}
|
|
148333
|
-
const extension = await getJSFileExtension$
|
|
148333
|
+
const extension = await getJSFileExtension$1({
|
|
148334
148334
|
helpers: args.helpers,
|
|
148335
148335
|
options: args.options
|
|
148336
148336
|
});
|
|
@@ -148345,14 +148345,14 @@ const upsertSliceLibraryIndexFile$2 = async (args) => {
|
|
|
148345
148345
|
helpers: args.helpers
|
|
148346
148346
|
});
|
|
148347
148347
|
};
|
|
148348
|
-
var __freeze$
|
|
148349
|
-
var __defProp$
|
|
148350
|
-
var __template$
|
|
148351
|
-
var _a$
|
|
148352
|
-
const createComponentFile$
|
|
148353
|
-
const pascalName = pascalCase$
|
|
148348
|
+
var __freeze$2 = Object.freeze;
|
|
148349
|
+
var __defProp$2 = Object.defineProperty;
|
|
148350
|
+
var __template$2 = (cooked, raw) => __freeze$2(__defProp$2(cooked, "raw", { value: __freeze$2(raw || cooked.slice()) }));
|
|
148351
|
+
var _a$2, _b$2;
|
|
148352
|
+
const createComponentFile$1 = async ({ data, helpers, actions, options: options8 }) => {
|
|
148353
|
+
const pascalName = pascalCase$1(data.model.name);
|
|
148354
148354
|
let contents;
|
|
148355
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$
|
|
148355
|
+
const isTypeScriptProject = await checkIsTypeScriptProject$1({
|
|
148356
148356
|
helpers,
|
|
148357
148357
|
options: options8
|
|
148358
148358
|
});
|
|
@@ -148366,362 +148366,10 @@ const createComponentFile$2 = async ({ data, helpers, actions, options: options8
|
|
|
148366
148366
|
if (data.componentContents) {
|
|
148367
148367
|
contents = data.componentContents;
|
|
148368
148368
|
} else if (isTypeScriptProject) {
|
|
148369
|
-
contents = stripIndent$2(_a$
|
|
148370
|
-
} else {
|
|
148371
|
-
contents = stripIndent$2(_b$2 || (_b$2 = __template$3(['\n <script setup>\n // The array passed to `getSliceComponentProps` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));\n <\/script>\n\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for {{ model.id }} (variation: {{ slice.variation }}) slices.\n ', "\n </section>\n </template>\n "], ['\n <script setup>\n // The array passed to \\`getSliceComponentProps\\` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));\n <\/script>\n\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for {{ model.id }} (variation: {{ slice.variation }}) slices.\n ', "\n </section>\n </template>\n "])), placeholderInstructions);
|
|
148372
|
-
}
|
|
148373
|
-
await writeSliceFile({
|
|
148374
|
-
libraryID: data.libraryID,
|
|
148375
|
-
model: data.model,
|
|
148376
|
-
filename: "index.vue",
|
|
148377
|
-
contents,
|
|
148378
|
-
format: options8.format,
|
|
148379
|
-
actions,
|
|
148380
|
-
helpers
|
|
148381
|
-
});
|
|
148382
|
-
};
|
|
148383
|
-
const sliceCreate$2 = async (data, context2) => {
|
|
148384
|
-
rejectIfNecessary$2(await Promise.allSettled([
|
|
148385
|
-
writeSliceModel({
|
|
148386
|
-
libraryID: data.libraryID,
|
|
148387
|
-
model: data.model,
|
|
148388
|
-
format: context2.options.format,
|
|
148389
|
-
helpers: context2.helpers
|
|
148390
|
-
}),
|
|
148391
|
-
createComponentFile$2({ data, ...context2 })
|
|
148392
|
-
]));
|
|
148393
|
-
rejectIfNecessary$2(await Promise.allSettled([
|
|
148394
|
-
upsertSliceLibraryIndexFile$2({
|
|
148395
|
-
libraryID: data.libraryID,
|
|
148396
|
-
...context2
|
|
148397
|
-
}),
|
|
148398
|
-
upsertGlobalTypeScriptTypes({
|
|
148399
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148400
|
-
format: context2.options.format,
|
|
148401
|
-
helpers: context2.helpers,
|
|
148402
|
-
actions: context2.actions
|
|
148403
|
-
})
|
|
148404
|
-
]));
|
|
148405
|
-
};
|
|
148406
|
-
const plugin$2 = definePlugin({
|
|
148407
|
-
meta: {
|
|
148408
|
-
name: name$2
|
|
148409
|
-
},
|
|
148410
|
-
defaultOptions: {
|
|
148411
|
-
format: true,
|
|
148412
|
-
lazyLoadSlices: true
|
|
148413
|
-
},
|
|
148414
|
-
setup({ hook }) {
|
|
148415
|
-
hook("project:init", projectInit$2);
|
|
148416
|
-
hook("slice:create", sliceCreate$2);
|
|
148417
|
-
hook("slice:update", async (data, context2) => {
|
|
148418
|
-
await writeSliceModel({
|
|
148419
|
-
libraryID: data.libraryID,
|
|
148420
|
-
model: data.model,
|
|
148421
|
-
...context2
|
|
148422
|
-
});
|
|
148423
|
-
await upsertGlobalTypeScriptTypes({
|
|
148424
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148425
|
-
format: context2.options.format,
|
|
148426
|
-
...context2
|
|
148427
|
-
});
|
|
148428
|
-
});
|
|
148429
|
-
hook("slice:rename", async (data, context2) => {
|
|
148430
|
-
await renameSlice({
|
|
148431
|
-
libraryID: data.libraryID,
|
|
148432
|
-
model: data.model,
|
|
148433
|
-
format: context2.options.format,
|
|
148434
|
-
...context2
|
|
148435
|
-
});
|
|
148436
|
-
rejectIfNecessary$2(await Promise.allSettled([
|
|
148437
|
-
upsertSliceLibraryIndexFile$2({
|
|
148438
|
-
libraryID: data.libraryID,
|
|
148439
|
-
...context2
|
|
148440
|
-
}),
|
|
148441
|
-
upsertGlobalTypeScriptTypes({
|
|
148442
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148443
|
-
format: context2.options.format,
|
|
148444
|
-
...context2
|
|
148445
|
-
})
|
|
148446
|
-
]));
|
|
148447
|
-
});
|
|
148448
|
-
hook("slice:delete", async (data, context2) => {
|
|
148449
|
-
await deleteSliceDirectory({
|
|
148450
|
-
libraryID: data.libraryID,
|
|
148451
|
-
model: data.model,
|
|
148452
|
-
...context2
|
|
148453
|
-
});
|
|
148454
|
-
rejectIfNecessary$2(await Promise.allSettled([
|
|
148455
|
-
upsertSliceLibraryIndexFile$2({
|
|
148456
|
-
libraryID: data.libraryID,
|
|
148457
|
-
...context2
|
|
148458
|
-
}),
|
|
148459
|
-
upsertGlobalTypeScriptTypes({
|
|
148460
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148461
|
-
format: context2.options.format,
|
|
148462
|
-
...context2
|
|
148463
|
-
})
|
|
148464
|
-
]));
|
|
148465
|
-
});
|
|
148466
|
-
hook("slice:read", async (data, context2) => {
|
|
148467
|
-
return await readSliceModel({
|
|
148468
|
-
libraryID: data.libraryID,
|
|
148469
|
-
sliceID: data.sliceID,
|
|
148470
|
-
...context2
|
|
148471
|
-
});
|
|
148472
|
-
});
|
|
148473
|
-
hook("slice-library:read", async (data, context2) => {
|
|
148474
|
-
return await readSliceLibrary({
|
|
148475
|
-
libraryID: data.libraryID,
|
|
148476
|
-
...context2
|
|
148477
|
-
});
|
|
148478
|
-
});
|
|
148479
|
-
hook("custom-type:create", async (data, context2) => {
|
|
148480
|
-
await writeCustomTypeModel({
|
|
148481
|
-
model: data.model,
|
|
148482
|
-
format: context2.options.format,
|
|
148483
|
-
...context2
|
|
148484
|
-
});
|
|
148485
|
-
await upsertGlobalTypeScriptTypes({
|
|
148486
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148487
|
-
format: context2.options.format,
|
|
148488
|
-
...context2
|
|
148489
|
-
});
|
|
148490
|
-
});
|
|
148491
|
-
hook("custom-type:update", async (data, context2) => {
|
|
148492
|
-
await writeCustomTypeModel({
|
|
148493
|
-
model: data.model,
|
|
148494
|
-
format: context2.options.format,
|
|
148495
|
-
...context2
|
|
148496
|
-
});
|
|
148497
|
-
await upsertGlobalTypeScriptTypes({
|
|
148498
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148499
|
-
format: context2.options.format,
|
|
148500
|
-
...context2
|
|
148501
|
-
});
|
|
148502
|
-
});
|
|
148503
|
-
hook("custom-type:rename", async (data, context2) => {
|
|
148504
|
-
await renameCustomType({
|
|
148505
|
-
model: data.model,
|
|
148506
|
-
format: context2.options.format,
|
|
148507
|
-
...context2
|
|
148508
|
-
});
|
|
148509
|
-
await upsertGlobalTypeScriptTypes({
|
|
148510
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148511
|
-
format: context2.options.format,
|
|
148512
|
-
...context2
|
|
148513
|
-
});
|
|
148514
|
-
});
|
|
148515
|
-
hook("custom-type:delete", async (data, context2) => {
|
|
148516
|
-
await deleteCustomTypeDirectory({
|
|
148517
|
-
customTypeID: data.model.id,
|
|
148518
|
-
...context2
|
|
148519
|
-
});
|
|
148520
|
-
await upsertGlobalTypeScriptTypes({
|
|
148521
|
-
filename: context2.options.generatedTypesFilePath,
|
|
148522
|
-
format: context2.options.format,
|
|
148523
|
-
...context2
|
|
148524
|
-
});
|
|
148525
|
-
});
|
|
148526
|
-
hook("custom-type:read", async (data, context2) => {
|
|
148527
|
-
return await readCustomTypeModel({
|
|
148528
|
-
customTypeID: data.id,
|
|
148529
|
-
...context2
|
|
148530
|
-
});
|
|
148531
|
-
});
|
|
148532
|
-
hook("custom-type-library:read", async (_data, context2) => {
|
|
148533
|
-
return await readCustomTypeLibrary({
|
|
148534
|
-
helpers: context2.helpers
|
|
148535
|
-
});
|
|
148536
|
-
});
|
|
148537
|
-
}
|
|
148538
|
-
});
|
|
148539
|
-
const name$1 = "@prismicio/adapter-nuxt2";
|
|
148540
|
-
const rejectIfNecessary$1 = (promiseSettledResults) => {
|
|
148541
|
-
const rejectedReasons = promiseSettledResults.filter((result) => result.status === "rejected").map((result) => result.reason);
|
|
148542
|
-
if (rejectedReasons.length > 0) {
|
|
148543
|
-
throw rejectedReasons[0];
|
|
148544
|
-
}
|
|
148545
|
-
};
|
|
148546
|
-
const NUXT_PRISMIC = "@nuxtjs/prismic";
|
|
148547
|
-
const installDependencies$1 = async ({ installDependencies: installDependencies2 }) => {
|
|
148548
|
-
await installDependencies2({
|
|
148549
|
-
dependencies: {
|
|
148550
|
-
[NUXT_PRISMIC]: "^1.4.2"
|
|
148551
|
-
},
|
|
148552
|
-
dev: true
|
|
148553
|
-
});
|
|
148554
|
-
};
|
|
148555
|
-
const configurePrismicModule = async ({ helpers, project }) => {
|
|
148556
|
-
let nuxtConfigFilename = "nuxt.config.js";
|
|
148557
|
-
if (!await checkHasProjectFile({ filename: nuxtConfigFilename, helpers })) {
|
|
148558
|
-
nuxtConfigFilename = "nuxt.config.ts";
|
|
148559
|
-
if (!await checkHasProjectFile({ filename: nuxtConfigFilename, helpers })) {
|
|
148560
|
-
return;
|
|
148561
|
-
}
|
|
148562
|
-
}
|
|
148563
|
-
const nuxtConfigPath = helpers.joinPathFromRoot(nuxtConfigFilename);
|
|
148564
|
-
const mod = await loadFile(nuxtConfigPath);
|
|
148565
|
-
const endpoint = project.config.apiEndpoint || `https://${project.config.repositoryName}.cdn.prismic.io/api/v2`;
|
|
148566
|
-
let config2;
|
|
148567
|
-
try {
|
|
148568
|
-
config2 = mod.exports.default.$type === "function-call" ? mod.exports.default.$args[0] : mod.exports.default;
|
|
148569
|
-
} catch {
|
|
148570
|
-
const errorMessage = `Failed to update ${path$1.basename(nuxtConfigPath)}`;
|
|
148571
|
-
console.error(errorMessage);
|
|
148572
|
-
console.warn(`Ensure that the following has been added to ${path$1.basename(nuxtConfigPath)}.`);
|
|
148573
|
-
console.warn(stripIndent$2`
|
|
148574
|
-
{
|
|
148575
|
-
buildModules: ["@nuxtjs/prismic"],
|
|
148576
|
-
prismic: {
|
|
148577
|
-
endpoint: "${endpoint}",
|
|
148578
|
-
modern: true
|
|
148579
|
-
}
|
|
148580
|
-
}
|
|
148581
|
-
`);
|
|
148582
|
-
throw errorMessage;
|
|
148583
|
-
}
|
|
148584
|
-
let hasInlinedConfiguration = false;
|
|
148585
|
-
const hasPrismicModuleRegistered = !![
|
|
148586
|
-
...config2.modules || [],
|
|
148587
|
-
...config2.buildModules || []
|
|
148588
|
-
].find((registration) => {
|
|
148589
|
-
if (typeof registration === "string") {
|
|
148590
|
-
return registration === NUXT_PRISMIC;
|
|
148591
|
-
} else if (Array.isArray(registration)) {
|
|
148592
|
-
hasInlinedConfiguration = !!registration[1];
|
|
148593
|
-
return registration[0] === NUXT_PRISMIC;
|
|
148594
|
-
}
|
|
148595
|
-
return false;
|
|
148596
|
-
});
|
|
148597
|
-
if (!hasPrismicModuleRegistered) {
|
|
148598
|
-
config2.buildModules ||= [];
|
|
148599
|
-
config2.buildModules.push(NUXT_PRISMIC);
|
|
148600
|
-
}
|
|
148601
|
-
if (!hasInlinedConfiguration) {
|
|
148602
|
-
mod.imports.$add({
|
|
148603
|
-
from: "./prismic.config.json",
|
|
148604
|
-
imported: "apiEndpoint"
|
|
148605
|
-
});
|
|
148606
|
-
mod.imports.$add({
|
|
148607
|
-
from: "./prismic.config.json",
|
|
148608
|
-
imported: "repositoryName"
|
|
148609
|
-
});
|
|
148610
|
-
if (config2.prismic) {
|
|
148611
|
-
config2.prismic.endpoint = builders.raw("apiEndpoint || repositoryName");
|
|
148612
|
-
} else {
|
|
148613
|
-
config2.prismic = {
|
|
148614
|
-
endpoint: builders.raw("apiEndpoint || repositoryName"),
|
|
148615
|
-
modern: true
|
|
148616
|
-
};
|
|
148617
|
-
}
|
|
148618
|
-
}
|
|
148619
|
-
await writeFile(mod, nuxtConfigPath);
|
|
148620
|
-
};
|
|
148621
|
-
const modifyPrismicConfig$1 = async ({ helpers, options: options8, actions }) => {
|
|
148622
|
-
const hasSrcDirectory = await checkHasProjectFile({
|
|
148623
|
-
filename: "src",
|
|
148624
|
-
helpers
|
|
148625
|
-
});
|
|
148626
|
-
const project = await helpers.getProject();
|
|
148627
|
-
if (hasSrcDirectory && project.config.libraries && JSON.stringify(project.config.libraries) === JSON.stringify(["./slices"])) {
|
|
148628
|
-
const sliceLibrary = await actions.readSliceLibrary({
|
|
148629
|
-
libraryID: project.config.libraries[0]
|
|
148630
|
-
});
|
|
148631
|
-
if (sliceLibrary.sliceIDs.length < 1) {
|
|
148632
|
-
project.config.libraries = ["./src/slices"];
|
|
148633
|
-
}
|
|
148634
|
-
}
|
|
148635
|
-
await helpers.updatePrismicConfig(project.config, {
|
|
148636
|
-
format: options8.format
|
|
148637
|
-
});
|
|
148638
|
-
};
|
|
148639
|
-
const projectInit$1 = async ({ installDependencies: _installDependencies }, context2) => {
|
|
148640
|
-
rejectIfNecessary$1(await Promise.allSettled([
|
|
148641
|
-
installDependencies$1({ installDependencies: _installDependencies }),
|
|
148642
|
-
configurePrismicModule(context2),
|
|
148643
|
-
modifyPrismicConfig$1(context2)
|
|
148644
|
-
]));
|
|
148645
|
-
};
|
|
148646
|
-
const NON_EDITABLE_FILE_BANNER$1 = "// Code generated by Prismic. DO NOT EDIT.";
|
|
148647
|
-
const checkIsTypeScriptProject$1 = async (args) => {
|
|
148648
|
-
return args.options.typescript ?? checkIsTypeScriptProject$4({ helpers: args.helpers });
|
|
148649
|
-
};
|
|
148650
|
-
const getJSFileExtension$1 = async ({ helpers, options: options8 }) => {
|
|
148651
|
-
const isTypeScriptProject = await checkIsTypeScriptProject$1({
|
|
148652
|
-
helpers,
|
|
148653
|
-
options: options8
|
|
148654
|
-
});
|
|
148655
|
-
return isTypeScriptProject ? "ts" : "js";
|
|
148656
|
-
};
|
|
148657
|
-
const pascalCase$1 = (...input) => {
|
|
148658
|
-
return pascalCase$6(input.filter(Boolean).join(" "));
|
|
148659
|
-
};
|
|
148660
|
-
const upsertSliceLibraryIndexFile$1 = async (args) => {
|
|
148661
|
-
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
148662
|
-
libraryID: args.libraryID
|
|
148663
|
-
});
|
|
148664
|
-
let contents;
|
|
148665
|
-
if (args.options.lazyLoadSlices) {
|
|
148666
|
-
contents = stripIndent$2`
|
|
148667
|
-
${NON_EDITABLE_FILE_BANNER$1}
|
|
148668
|
-
|
|
148669
|
-
export const components = {
|
|
148670
|
-
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148671
|
-
const id2 = slice2.model.id;
|
|
148672
|
-
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148673
|
-
model: slice2.model,
|
|
148674
|
-
helpers: args.helpers,
|
|
148675
|
-
libraryID: args.libraryID
|
|
148676
|
-
}));
|
|
148677
|
-
return `${id2}: () => import(/* webpackChunkName: "prismic__${args.libraryID.replace(/[^\w]/g, "")}__${id2}" */ "./${dirName}/index.vue")`;
|
|
148678
|
-
}))).join(",\n")}
|
|
148679
|
-
};
|
|
148680
|
-
`;
|
|
148369
|
+
contents = stripIndent$2(_a$2 || (_a$2 = __template$2(['\n <script setup lang="ts">\n import type { Content } from "@prismicio/client";\n\n // The array passed to `getSliceComponentProps` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n defineProps(getSliceComponentProps<Content.', 'Slice>(\n ["slice", "index", "slices", "context"]\n ));\n <\/script>\n\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for ', " (variation: {{ slice.variation }}) slices.\n ", "\n </section>\n </template>\n "], ['\n <script setup lang="ts">\n import type { Content } from "@prismicio/client";\n\n // The array passed to \\`getSliceComponentProps\\` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n defineProps(getSliceComponentProps<Content.', 'Slice>(\n ["slice", "index", "slices", "context"]\n ));\n <\/script>\n\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for ', " (variation: {{ slice.variation }}) slices.\n ", "\n </section>\n </template>\n "])), pascalName, data.model.id, placeholderInstructions);
|
|
148681
148370
|
} else {
|
|
148682
|
-
contents = stripIndent$2`
|
|
148683
|
-
${NON_EDITABLE_FILE_BANNER$1}
|
|
148684
|
-
|
|
148685
|
-
${(await Promise.all(slices2.map(async (slice2) => {
|
|
148686
|
-
const dirName = path$1.basename(await buildSliceDirectoryPath({
|
|
148687
|
-
model: slice2.model,
|
|
148688
|
-
helpers: args.helpers,
|
|
148689
|
-
libraryID: args.libraryID
|
|
148690
|
-
}));
|
|
148691
|
-
const componentName = pascalCase$1(slice2.model.name);
|
|
148692
|
-
return `import ${componentName} from "./${dirName}/index.vue";`;
|
|
148693
|
-
}))).join("\n")}
|
|
148694
|
-
|
|
148695
|
-
export const components = {
|
|
148696
|
-
${slices2.map((slice2) => {
|
|
148697
|
-
const id2 = slice2.model.id;
|
|
148698
|
-
const componentName = pascalCase$1(slice2.model.name);
|
|
148699
|
-
return `${id2}: ${componentName}`;
|
|
148700
|
-
}).join(",\n")}
|
|
148701
|
-
};
|
|
148702
|
-
`;
|
|
148371
|
+
contents = stripIndent$2(_b$2 || (_b$2 = __template$2(['\n <script setup>\n // The array passed to `getSliceComponentProps` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));\n <\/script>\n\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for {{ model.id }} (variation: {{ slice.variation }}) slices.\n ', "\n </section>\n </template>\n "], ['\n <script setup>\n // The array passed to \\`getSliceComponentProps\\` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));\n <\/script>\n\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for {{ model.id }} (variation: {{ slice.variation }}) slices.\n ', "\n </section>\n </template>\n "])), placeholderInstructions);
|
|
148703
148372
|
}
|
|
148704
|
-
const extension = await getJSFileExtension$1({
|
|
148705
|
-
helpers: args.helpers,
|
|
148706
|
-
options: args.options
|
|
148707
|
-
});
|
|
148708
|
-
const filePath = path$1.join(buildSliceLibraryDirectoryPath({
|
|
148709
|
-
libraryID: args.libraryID,
|
|
148710
|
-
helpers: args.helpers
|
|
148711
|
-
}), `index.${extension}`);
|
|
148712
|
-
await writeProjectFile({
|
|
148713
|
-
filename: filePath,
|
|
148714
|
-
contents,
|
|
148715
|
-
format: args.options.format,
|
|
148716
|
-
helpers: args.helpers
|
|
148717
|
-
});
|
|
148718
|
-
};
|
|
148719
|
-
var __freeze$2 = Object.freeze;
|
|
148720
|
-
var __defProp$2 = Object.defineProperty;
|
|
148721
|
-
var __template$2 = (cooked, raw) => __freeze$2(__defProp$2(cooked, "raw", { value: __freeze$2(raw || cooked.slice()) }));
|
|
148722
|
-
var _a$2;
|
|
148723
|
-
const createComponentFile$1 = async ({ data, helpers, actions, options: options8 }) => {
|
|
148724
|
-
const contents = data.componentContents ?? stripIndent$2(_a$2 || (_a$2 = __template$2(['\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for ', ' (variation: {{ slice.variation }}) Slices\n <br />\n <strong>You can edit this slice directly in your code editor.</strong>\n <!--\n 💡 Use the Prismic MCP server with your code editor\n 📚 Docs: https://prismic.io/docs/ai#code-with-prismics-mcp-server\n -->\n </section>\n </template>\n\n <script>\n import { getSliceComponentProps } from "@prismicio/vue/components";\n\n export default {\n // The array passed to `getSliceComponentProps` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n props: getSliceComponentProps(["slice", "index", "slices", "context"]),\n };\n <\/script>\n '], ['\n <template>\n <section\n :data-slice-type="slice.slice_type"\n :data-slice-variation="slice.variation"\n >\n Placeholder component for ', ' (variation: {{ slice.variation }}) Slices\n <br />\n <strong>You can edit this slice directly in your code editor.</strong>\n <!--\n 💡 Use the Prismic MCP server with your code editor\n 📚 Docs: https://prismic.io/docs/ai#code-with-prismics-mcp-server\n -->\n </section>\n </template>\n\n <script>\n import { getSliceComponentProps } from "@prismicio/vue/components";\n\n export default {\n // The array passed to \\`getSliceComponentProps\\` is purely optional.\n // Consider it as a visual hint for you when templating your slice.\n props: getSliceComponentProps(["slice", "index", "slices", "context"]),\n };\n <\/script>\n '])), data.model.id);
|
|
148725
148373
|
await writeSliceFile({
|
|
148726
148374
|
libraryID: data.libraryID,
|
|
148727
148375
|
model: data.model,
|
|
@@ -148890,7 +148538,7 @@ const plugin$1 = definePlugin({
|
|
|
148890
148538
|
});
|
|
148891
148539
|
const name = "@prismicio/adapter-sveltekit";
|
|
148892
148540
|
const checkIsTypeScriptProject = async (args) => {
|
|
148893
|
-
return args.options.typescript ?? checkIsTypeScriptProject$
|
|
148541
|
+
return args.options.typescript ?? checkIsTypeScriptProject$3({ helpers: args.helpers });
|
|
148894
148542
|
};
|
|
148895
148543
|
const getJSFileExtension = async ({ helpers, options: options8 }) => {
|
|
148896
148544
|
const isTypeScriptProject = await checkIsTypeScriptProject({
|
|
@@ -148928,7 +148576,7 @@ const rejectIfNecessary = (promiseSettledResults) => {
|
|
|
148928
148576
|
};
|
|
148929
148577
|
const NON_EDITABLE_FILE_BANNER = "// Code generated by Prismic. DO NOT EDIT.";
|
|
148930
148578
|
const pascalCase = (...input) => {
|
|
148931
|
-
return pascalCase$
|
|
148579
|
+
return pascalCase$5(input.filter(Boolean).join(" "));
|
|
148932
148580
|
};
|
|
148933
148581
|
const upsertSliceLibraryIndexFile = async (args) => {
|
|
148934
148582
|
const slices2 = await args.actions.readAllSliceModelsForLibrary({
|
|
@@ -149526,14 +149174,6 @@ const plugin = definePlugin({
|
|
|
149526
149174
|
}
|
|
149527
149175
|
});
|
|
149528
149176
|
const FRAMEWORKS = {
|
|
149529
|
-
"nuxt-2": {
|
|
149530
|
-
name: "Nuxt 2",
|
|
149531
|
-
telemetryID: "nuxt-2",
|
|
149532
|
-
adapterName: "@prismicio/adapter-nuxt2",
|
|
149533
|
-
compatibility: {
|
|
149534
|
-
nuxt: "^2.0.0"
|
|
149535
|
-
}
|
|
149536
|
-
},
|
|
149537
149177
|
nuxt: {
|
|
149538
149178
|
name: "Nuxt",
|
|
149539
149179
|
telemetryID: "nuxt",
|
|
@@ -149633,9 +149273,8 @@ async function initFramework(args) {
|
|
|
149633
149273
|
]);
|
|
149634
149274
|
}
|
|
149635
149275
|
const FRAMEWORK_PLUGINS = {
|
|
149636
|
-
"@prismicio/adapter-next": plugin$
|
|
149637
|
-
"@prismicio/adapter-nuxt": plugin$
|
|
149638
|
-
"@prismicio/adapter-nuxt2": plugin$1,
|
|
149276
|
+
"@prismicio/adapter-next": plugin$2,
|
|
149277
|
+
"@prismicio/adapter-nuxt": plugin$1,
|
|
149639
149278
|
"@prismicio/adapter-sveltekit": plugin
|
|
149640
149279
|
};
|
|
149641
149280
|
async function detectProjectState(args) {
|
|
@@ -149988,7 +149627,7 @@ async function sync(args) {
|
|
|
149988
149627
|
async function initTelemetry(args) {
|
|
149989
149628
|
const { manager, commandType, repositoryName } = args;
|
|
149990
149629
|
await manager.telemetry.initTelemetry({
|
|
149991
|
-
appName: name$
|
|
149630
|
+
appName: name$3,
|
|
149992
149631
|
appVersion: version$k
|
|
149993
149632
|
});
|
|
149994
149633
|
let resolvedRepositoryName = repositoryName;
|
|
@@ -150025,7 +149664,7 @@ DOCUMENTATION
|
|
|
150025
149664
|
https://prismic.io/docs
|
|
150026
149665
|
|
|
150027
149666
|
VERSION
|
|
150028
|
-
${name$
|
|
149667
|
+
${name$3}@${version$k}
|
|
150029
149668
|
|
|
150030
149669
|
USAGE
|
|
150031
149670
|
$ npx prismic@latest init --repository <repository-id>
|
|
@@ -150088,7 +149727,7 @@ async function run() {
|
|
|
150088
149727
|
process.exit(0);
|
|
150089
149728
|
}
|
|
150090
149729
|
if (cli.flags.version) {
|
|
150091
|
-
console.info(`${name$
|
|
149730
|
+
console.info(`${name$3}@${version$k}`);
|
|
150092
149731
|
process.exit(0);
|
|
150093
149732
|
}
|
|
150094
149733
|
const cliArgs = CLIArgs.safeParse({
|
|
@@ -150166,4 +149805,4 @@ export {
|
|
|
150166
149805
|
getDefaultExportFromCjs$3 as g,
|
|
150167
149806
|
run as r
|
|
150168
149807
|
};
|
|
150169
|
-
//# sourceMappingURL=cli-
|
|
149808
|
+
//# sourceMappingURL=cli-DDs8_xoz.js.map
|