@slicemachine/adapter-nuxt 0.0.2-dev-plugins-m3.0
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/LICENSE +202 -0
- package/README.md +98 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs +41 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js +41 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
- package/dist/_node_modules/fetch-blob/file.cjs +61 -0
- package/dist/_node_modules/fetch-blob/file.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/file.js +61 -0
- package/dist/_node_modules/fetch-blob/file.js.map +1 -0
- package/dist/_node_modules/fetch-blob/index.cjs +223 -0
- package/dist/_node_modules/fetch-blob/index.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/index.js +223 -0
- package/dist/_node_modules/fetch-blob/index.js.map +1 -0
- package/dist/_node_modules/fetch-blob/streams.cjs +43 -0
- package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/streams.js +42 -0
- package/dist/_node_modules/fetch-blob/streams.js.map +1 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs +116 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.js +116 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -0
- package/dist/_node_modules/node-domexception/index.cjs +11 -0
- package/dist/_node_modules/node-domexception/index.cjs.map +1 -0
- package/dist/_node_modules/node-domexception/index.js +10 -0
- package/dist/_node_modules/node-domexception/index.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/body.cjs +262 -0
- package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/body.js +262 -0
- package/dist/_node_modules/node-fetch/src/body.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs +10 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js +10 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/base.cjs +17 -0
- package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/base.js +17 -0
- package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs +19 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js +19 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/headers.cjs +190 -0
- package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/headers.js +190 -0
- package/dist/_node_modules/node-fetch/src/headers.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/index.cjs +292 -0
- package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/index.js +292 -0
- package/dist/_node_modules/node-fetch/src/index.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/request.cjs +206 -0
- package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/request.js +206 -0
- package/dist/_node_modules/node-fetch/src/request.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/response.cjs +122 -0
- package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/response.js +123 -0
- package/dist/_node_modules/node-fetch/src/response.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs +12 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.js +12 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs +8 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js +8 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is.cjs +28 -0
- package/dist/_node_modules/node-fetch/src/utils/is.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is.js +28 -0
- package/dist/_node_modules/node-fetch/src/utils/is.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +356 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +356 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs +149 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.js +149 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +3822 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +3822 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +5 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/ponyfill.es2018.cjs +13 -0
- package/dist/_virtual/ponyfill.es2018.cjs.map +1 -0
- package/dist/_virtual/ponyfill.es2018.js +14 -0
- package/dist/_virtual/ponyfill.es2018.js.map +1 -0
- package/dist/constants.cjs +5 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -0
- package/dist/hooks/customType-asset-delete.cjs +31 -0
- package/dist/hooks/customType-asset-delete.cjs.map +1 -0
- package/dist/hooks/customType-asset-delete.d.ts +3 -0
- package/dist/hooks/customType-asset-delete.js +14 -0
- package/dist/hooks/customType-asset-delete.js.map +1 -0
- package/dist/hooks/customType-asset-read.cjs +34 -0
- package/dist/hooks/customType-asset-read.cjs.map +1 -0
- package/dist/hooks/customType-asset-read.d.ts +3 -0
- package/dist/hooks/customType-asset-read.js +17 -0
- package/dist/hooks/customType-asset-read.js.map +1 -0
- package/dist/hooks/customType-asset-update.cjs +34 -0
- package/dist/hooks/customType-asset-update.cjs.map +1 -0
- package/dist/hooks/customType-asset-update.d.ts +3 -0
- package/dist/hooks/customType-asset-update.js +16 -0
- package/dist/hooks/customType-asset-update.js.map +1 -0
- package/dist/hooks/customType-create.cjs +43 -0
- package/dist/hooks/customType-create.cjs.map +1 -0
- package/dist/hooks/customType-create.d.ts +3 -0
- package/dist/hooks/customType-create.js +25 -0
- package/dist/hooks/customType-create.js.map +1 -0
- package/dist/hooks/customType-delete.cjs +32 -0
- package/dist/hooks/customType-delete.cjs.map +1 -0
- package/dist/hooks/customType-delete.d.ts +3 -0
- package/dist/hooks/customType-delete.js +15 -0
- package/dist/hooks/customType-delete.js.map +1 -0
- package/dist/hooks/customType-read.cjs +31 -0
- package/dist/hooks/customType-read.cjs.map +1 -0
- package/dist/hooks/customType-read.d.ts +3 -0
- package/dist/hooks/customType-read.js +14 -0
- package/dist/hooks/customType-read.js.map +1 -0
- package/dist/hooks/customType-rename.cjs +6 -0
- package/dist/hooks/customType-rename.cjs.map +1 -0
- package/dist/hooks/customType-rename.d.ts +1 -0
- package/dist/hooks/customType-rename.js +6 -0
- package/dist/hooks/customType-rename.js.map +1 -0
- package/dist/hooks/customType-update.cjs +6 -0
- package/dist/hooks/customType-update.cjs.map +1 -0
- package/dist/hooks/customType-update.d.ts +1 -0
- package/dist/hooks/customType-update.js +6 -0
- package/dist/hooks/customType-update.js.map +1 -0
- package/dist/hooks/customTypeLibrary-read.cjs +53 -0
- package/dist/hooks/customTypeLibrary-read.cjs.map +1 -0
- package/dist/hooks/customTypeLibrary-read.d.ts +3 -0
- package/dist/hooks/customTypeLibrary-read.js +35 -0
- package/dist/hooks/customTypeLibrary-read.js.map +1 -0
- package/dist/hooks/project-init.cjs +112 -0
- package/dist/hooks/project-init.cjs.map +1 -0
- package/dist/hooks/project-init.d.ts +3 -0
- package/dist/hooks/project-init.js +94 -0
- package/dist/hooks/project-init.js.map +1 -0
- package/dist/hooks/slice-asset-delete.cjs +33 -0
- package/dist/hooks/slice-asset-delete.cjs.map +1 -0
- package/dist/hooks/slice-asset-delete.d.ts +3 -0
- package/dist/hooks/slice-asset-delete.js +16 -0
- package/dist/hooks/slice-asset-delete.js.map +1 -0
- package/dist/hooks/slice-asset-read.cjs +36 -0
- package/dist/hooks/slice-asset-read.cjs.map +1 -0
- package/dist/hooks/slice-asset-read.d.ts +3 -0
- package/dist/hooks/slice-asset-read.js +19 -0
- package/dist/hooks/slice-asset-read.js.map +1 -0
- package/dist/hooks/slice-asset-update.cjs +36 -0
- package/dist/hooks/slice-asset-update.cjs.map +1 -0
- package/dist/hooks/slice-asset-update.d.ts +3 -0
- package/dist/hooks/slice-asset-update.js +18 -0
- package/dist/hooks/slice-asset-update.js.map +1 -0
- package/dist/hooks/slice-create.cjs +77 -0
- package/dist/hooks/slice-create.cjs.map +1 -0
- package/dist/hooks/slice-create.d.ts +3 -0
- package/dist/hooks/slice-create.js +59 -0
- package/dist/hooks/slice-create.js.map +1 -0
- package/dist/hooks/slice-delete.cjs +41 -0
- package/dist/hooks/slice-delete.cjs.map +1 -0
- package/dist/hooks/slice-delete.d.ts +3 -0
- package/dist/hooks/slice-delete.js +24 -0
- package/dist/hooks/slice-delete.js.map +1 -0
- package/dist/hooks/slice-read.cjs +62 -0
- package/dist/hooks/slice-read.cjs.map +1 -0
- package/dist/hooks/slice-read.d.ts +3 -0
- package/dist/hooks/slice-read.js +44 -0
- package/dist/hooks/slice-read.js.map +1 -0
- package/dist/hooks/slice-rename.cjs +51 -0
- package/dist/hooks/slice-rename.cjs.map +1 -0
- package/dist/hooks/slice-rename.d.ts +3 -0
- package/dist/hooks/slice-rename.js +34 -0
- package/dist/hooks/slice-rename.js.map +1 -0
- package/dist/hooks/slice-update.cjs +14 -0
- package/dist/hooks/slice-update.cjs.map +1 -0
- package/dist/hooks/slice-update.d.ts +3 -0
- package/dist/hooks/slice-update.js +14 -0
- package/dist/hooks/slice-update.js.map +1 -0
- package/dist/hooks/sliceLibrary-read.cjs +52 -0
- package/dist/hooks/sliceLibrary-read.cjs.map +1 -0
- package/dist/hooks/sliceLibrary-read.d.ts +3 -0
- package/dist/hooks/sliceLibrary-read.js +34 -0
- package/dist/hooks/sliceLibrary-read.js.map +1 -0
- package/dist/hooks/sliceSimulator-setup-read.cjs +150 -0
- package/dist/hooks/sliceSimulator-setup-read.cjs.map +1 -0
- package/dist/hooks/sliceSimulator-setup-read.d.ts +3 -0
- package/dist/hooks/sliceSimulator-setup-read.js +150 -0
- package/dist/hooks/sliceSimulator-setup-read.js.map +1 -0
- package/dist/hooks/snippet-read.cjs +101 -0
- package/dist/hooks/snippet-read.cjs.map +1 -0
- package/dist/hooks/snippet-read.d.ts +3 -0
- package/dist/hooks/snippet-read.js +101 -0
- package/dist/hooks/snippet-read.js.map +1 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/buildCustomTypeAssetPath.cjs +29 -0
- package/dist/lib/buildCustomTypeAssetPath.cjs.map +1 -0
- package/dist/lib/buildCustomTypeAssetPath.d.ts +9 -0
- package/dist/lib/buildCustomTypeAssetPath.js +12 -0
- package/dist/lib/buildCustomTypeAssetPath.js.map +1 -0
- package/dist/lib/buildCustomTypeDirectoryPath.cjs +26 -0
- package/dist/lib/buildCustomTypeDirectoryPath.cjs.map +1 -0
- package/dist/lib/buildCustomTypeDirectoryPath.d.ts +8 -0
- package/dist/lib/buildCustomTypeDirectoryPath.js +9 -0
- package/dist/lib/buildCustomTypeDirectoryPath.js.map +1 -0
- package/dist/lib/buildCustomTypeLibraryDirectoryPath.cjs +7 -0
- package/dist/lib/buildCustomTypeLibraryDirectoryPath.cjs.map +1 -0
- package/dist/lib/buildCustomTypeLibraryDirectoryPath.d.ts +7 -0
- package/dist/lib/buildCustomTypeLibraryDirectoryPath.js +7 -0
- package/dist/lib/buildCustomTypeLibraryDirectoryPath.js.map +1 -0
- package/dist/lib/buildSliceAssetPath.cjs +34 -0
- package/dist/lib/buildSliceAssetPath.cjs.map +1 -0
- package/dist/lib/buildSliceAssetPath.d.ts +11 -0
- package/dist/lib/buildSliceAssetPath.js +17 -0
- package/dist/lib/buildSliceAssetPath.js.map +1 -0
- package/dist/lib/buildSliceDirectoryPath.cjs +30 -0
- package/dist/lib/buildSliceDirectoryPath.cjs.map +1 -0
- package/dist/lib/buildSliceDirectoryPath.d.ts +10 -0
- package/dist/lib/buildSliceDirectoryPath.js +13 -0
- package/dist/lib/buildSliceDirectoryPath.js.map +1 -0
- package/dist/lib/buildSliceLibraryDirectoryPath.cjs +7 -0
- package/dist/lib/buildSliceLibraryDirectoryPath.cjs.map +1 -0
- package/dist/lib/buildSliceLibraryDirectoryPath.d.ts +8 -0
- package/dist/lib/buildSliceLibraryDirectoryPath.js +7 -0
- package/dist/lib/buildSliceLibraryDirectoryPath.js.map +1 -0
- package/dist/lib/checkIsTypeScriptProject.cjs +9 -0
- package/dist/lib/checkIsTypeScriptProject.cjs.map +1 -0
- package/dist/lib/checkIsTypeScriptProject.d.ts +8 -0
- package/dist/lib/checkIsTypeScriptProject.js +9 -0
- package/dist/lib/checkIsTypeScriptProject.js.map +1 -0
- package/dist/lib/checkPathExists.cjs +30 -0
- package/dist/lib/checkPathExists.cjs.map +1 -0
- package/dist/lib/checkPathExists.d.ts +2 -0
- package/dist/lib/checkPathExists.js +13 -0
- package/dist/lib/checkPathExists.js.map +1 -0
- package/dist/lib/isSharedSliceModel.cjs +7 -0
- package/dist/lib/isSharedSliceModel.cjs.map +1 -0
- package/dist/lib/isSharedSliceModel.d.ts +335 -0
- package/dist/lib/isSharedSliceModel.js +7 -0
- package/dist/lib/isSharedSliceModel.js.map +1 -0
- package/dist/lib/pascalCase.cjs +8 -0
- package/dist/lib/pascalCase.cjs.map +1 -0
- package/dist/lib/pascalCase.d.ts +8 -0
- package/dist/lib/pascalCase.js +8 -0
- package/dist/lib/pascalCase.js.map +1 -0
- package/dist/lib/readJSONFile.cjs +26 -0
- package/dist/lib/readJSONFile.cjs.map +1 -0
- package/dist/lib/readJSONFile.d.ts +1 -0
- package/dist/lib/readJSONFile.js +9 -0
- package/dist/lib/readJSONFile.js.map +1 -0
- package/dist/lib/rejectIfNecessary.cjs +10 -0
- package/dist/lib/rejectIfNecessary.cjs.map +1 -0
- package/dist/lib/rejectIfNecessary.d.ts +1 -0
- package/dist/lib/rejectIfNecessary.js +10 -0
- package/dist/lib/rejectIfNecessary.js.map +1 -0
- package/dist/lib/updateSliceModelFile.cjs +33 -0
- package/dist/lib/updateSliceModelFile.cjs.map +1 -0
- package/dist/lib/updateSliceModelFile.d.ts +9 -0
- package/dist/lib/updateSliceModelFile.js +15 -0
- package/dist/lib/updateSliceModelFile.js.map +1 -0
- package/dist/lib/upsertGlobalContentTypes.cjs +55 -0
- package/dist/lib/upsertGlobalContentTypes.cjs.map +1 -0
- package/dist/lib/upsertGlobalContentTypes.d.ts +12 -0
- package/dist/lib/upsertGlobalContentTypes.js +37 -0
- package/dist/lib/upsertGlobalContentTypes.js.map +1 -0
- package/dist/lib/upsertSliceLibraryIndexFile.cjs +83 -0
- package/dist/lib/upsertSliceLibraryIndexFile.cjs.map +1 -0
- package/dist/lib/upsertSliceLibraryIndexFile.d.ts +7 -0
- package/dist/lib/upsertSliceLibraryIndexFile.js +65 -0
- package/dist/lib/upsertSliceLibraryIndexFile.js.map +1 -0
- package/dist/packages/adapter-nuxt/package.json.cjs +5 -0
- package/dist/packages/adapter-nuxt/package.json.cjs.map +1 -0
- package/dist/packages/adapter-nuxt/package.json.js +5 -0
- package/dist/packages/adapter-nuxt/package.json.js.map +1 -0
- package/dist/plugin.cjs +59 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +59 -0
- package/dist/plugin.js.map +1 -0
- package/dist/simulator/SliceSimulator.cjs +79 -0
- package/dist/simulator/SliceSimulator.cjs.map +1 -0
- package/dist/simulator/SliceSimulator.d.ts +34 -0
- package/dist/simulator/SliceSimulator.js +79 -0
- package/dist/simulator/SliceSimulator.js.map +1 -0
- package/dist/simulator/index.d.ts +2 -0
- package/dist/simulator.cjs +5 -0
- package/dist/simulator.cjs.map +1 -0
- package/dist/simulator.js +5 -0
- package/dist/simulator.js.map +1 -0
- package/dist/types.d.ts +5 -0
- package/package.json +107 -0
- package/src/constants.ts +5 -0
- package/src/hooks/customType-asset-delete.ts +18 -0
- package/src/hooks/customType-asset-read.ts +22 -0
- package/src/hooks/customType-asset-update.ts +20 -0
- package/src/hooks/customType-create.ts +45 -0
- package/src/hooks/customType-delete.ts +21 -0
- package/src/hooks/customType-read.ts +24 -0
- package/src/hooks/customType-rename.ts +3 -0
- package/src/hooks/customType-update.ts +3 -0
- package/src/hooks/customTypeLibrary-read.ts +53 -0
- package/src/hooks/project-init.ts +163 -0
- package/src/hooks/slice-asset-delete.ts +21 -0
- package/src/hooks/slice-asset-read.ts +25 -0
- package/src/hooks/slice-asset-update.ts +23 -0
- package/src/hooks/slice-create.ts +115 -0
- package/src/hooks/slice-delete.ts +41 -0
- package/src/hooks/slice-read.ts +69 -0
- package/src/hooks/slice-rename.ts +46 -0
- package/src/hooks/slice-update.ts +19 -0
- package/src/hooks/sliceLibrary-read.ts +48 -0
- package/src/hooks/sliceSimulator-setup-read.ts +209 -0
- package/src/hooks/snippet-read.ts +145 -0
- package/src/index.ts +4 -0
- package/src/lib/buildCustomTypeAssetPath.ts +24 -0
- package/src/lib/buildCustomTypeDirectoryPath.ts +20 -0
- package/src/lib/buildCustomTypeLibraryDirectoryPath.ts +13 -0
- package/src/lib/buildSliceAssetPath.ts +32 -0
- package/src/lib/buildSliceDirectoryPath.ts +26 -0
- package/src/lib/buildSliceLibraryDirectoryPath.ts +14 -0
- package/src/lib/checkIsTypeScriptProject.ts +17 -0
- package/src/lib/checkPathExists.ts +12 -0
- package/src/lib/isSharedSliceModel.ts +14 -0
- package/src/lib/pascalCase.ts +12 -0
- package/src/lib/readJSONFile.ts +7 -0
- package/src/lib/rejectIfNecessary.ts +16 -0
- package/src/lib/updateSliceModelFile.ts +33 -0
- package/src/lib/upsertGlobalContentTypes.ts +62 -0
- package/src/lib/upsertSliceLibraryIndexFile.ts +90 -0
- package/src/plugin.ts +63 -0
- package/src/simulator/SliceSimulator.ts +157 -0
- package/src/simulator/index.ts +2 -0
- package/src/types.ts +5 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { buildCustomTypeDirectoryPath } from "./buildCustomTypeDirectoryPath.js";
|
|
3
|
+
const buildCustomTypeAssetPath = (args) => {
|
|
4
|
+
return path.join(buildCustomTypeDirectoryPath({
|
|
5
|
+
customTypeID: args.customTypeID,
|
|
6
|
+
helpers: args.helpers
|
|
7
|
+
}), args.assetID);
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
buildCustomTypeAssetPath
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=buildCustomTypeAssetPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildCustomTypeAssetPath.js","sources":["../../../src/lib/buildCustomTypeAssetPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildCustomTypeDirectoryPath } from \"./buildCustomTypeDirectoryPath\";\n\ntype BuildCustomTypeAssetPathArgs = {\n\tcustomTypeID: string;\n\tassetID: string;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildCustomTypeAssetPath = (\n\targs: BuildCustomTypeAssetPathArgs,\n): string => {\n\treturn path.join(\n\t\tbuildCustomTypeDirectoryPath({\n\t\t\tcustomTypeID: args.customTypeID,\n\t\t\thelpers: args.helpers,\n\t\t}),\n\t\targs.assetID,\n\t);\n};\n"],"names":[],"mappings":";;AAaa,MAAA,2BAA2B,CACvC,SACW;AACJ,SAAA,KAAK,KACX,6BAA6B;AAAA,IAC5B,cAAc,KAAK;AAAA,IACnB,SAAS,KAAK;AAAA,EAAA,CACd,GACD,KAAK,OAAO;AAEd;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const buildCustomTypeLibraryDirectoryPath = require("./buildCustomTypeLibraryDirectoryPath.cjs");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
|
|
22
|
+
const buildCustomTypeDirectoryPath = (args) => {
|
|
23
|
+
return path__namespace.join(buildCustomTypeLibraryDirectoryPath.buildCustomTypeLibraryDirectoryPath({ helpers: args.helpers }), args.customTypeID);
|
|
24
|
+
};
|
|
25
|
+
exports.buildCustomTypeDirectoryPath = buildCustomTypeDirectoryPath;
|
|
26
|
+
//# sourceMappingURL=buildCustomTypeDirectoryPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildCustomTypeDirectoryPath.cjs","sources":["../../../src/lib/buildCustomTypeDirectoryPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildCustomTypeLibraryDirectoryPath } from \"./buildCustomTypeLibraryDirectoryPath\";\n\ntype BuildCustomTypeDirectoryPathArgs = {\n\tcustomTypeID: string;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildCustomTypeDirectoryPath = (\n\targs: BuildCustomTypeDirectoryPathArgs,\n): string => {\n\treturn path.join(\n\t\tbuildCustomTypeLibraryDirectoryPath({ helpers: args.helpers }),\n\t\targs.customTypeID,\n\t);\n};\n"],"names":["path","buildCustomTypeLibraryDirectoryPath"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYa,MAAA,+BAA+B,CAC3C,SACW;AACJ,SAAAA,gBAAK,KACXC,oCAAA,oCAAoC,EAAE,SAAS,KAAK,SAAS,GAC7D,KAAK,YAAY;AAEnB;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PluginOptions } from "../types";
|
|
3
|
+
type BuildCustomTypeDirectoryPathArgs = {
|
|
4
|
+
customTypeID: string;
|
|
5
|
+
helpers: SliceMachineContext<PluginOptions>["helpers"];
|
|
6
|
+
};
|
|
7
|
+
export declare const buildCustomTypeDirectoryPath: (args: BuildCustomTypeDirectoryPathArgs) => string;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { buildCustomTypeLibraryDirectoryPath } from "./buildCustomTypeLibraryDirectoryPath.js";
|
|
3
|
+
const buildCustomTypeDirectoryPath = (args) => {
|
|
4
|
+
return path.join(buildCustomTypeLibraryDirectoryPath({ helpers: args.helpers }), args.customTypeID);
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
buildCustomTypeDirectoryPath
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=buildCustomTypeDirectoryPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildCustomTypeDirectoryPath.js","sources":["../../../src/lib/buildCustomTypeDirectoryPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildCustomTypeLibraryDirectoryPath } from \"./buildCustomTypeLibraryDirectoryPath\";\n\ntype BuildCustomTypeDirectoryPathArgs = {\n\tcustomTypeID: string;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildCustomTypeDirectoryPath = (\n\targs: BuildCustomTypeDirectoryPathArgs,\n): string => {\n\treturn path.join(\n\t\tbuildCustomTypeLibraryDirectoryPath({ helpers: args.helpers }),\n\t\targs.customTypeID,\n\t);\n};\n"],"names":[],"mappings":";;AAYa,MAAA,+BAA+B,CAC3C,SACW;AACJ,SAAA,KAAK,KACX,oCAAoC,EAAE,SAAS,KAAK,SAAS,GAC7D,KAAK,YAAY;AAEnB;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildCustomTypeLibraryDirectoryPath = (args) => {
|
|
4
|
+
return args.helpers.joinPathFromRoot("customtypes");
|
|
5
|
+
};
|
|
6
|
+
exports.buildCustomTypeLibraryDirectoryPath = buildCustomTypeLibraryDirectoryPath;
|
|
7
|
+
//# sourceMappingURL=buildCustomTypeLibraryDirectoryPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildCustomTypeLibraryDirectoryPath.cjs","sources":["../../../src/lib/buildCustomTypeLibraryDirectoryPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\n\nimport { PluginOptions } from \"../types\";\n\ntype BuildCustomTypeLibraryDirectoryPathArgs = {\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildCustomTypeLibraryDirectoryPath = (\n\targs: BuildCustomTypeLibraryDirectoryPathArgs,\n): string => {\n\treturn args.helpers.joinPathFromRoot(\"customtypes\");\n};\n"],"names":[],"mappings":";;AAQa,MAAA,sCAAsC,CAClD,SACW;AACJ,SAAA,KAAK,QAAQ,iBAAiB,aAAa;AACnD;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PluginOptions } from "../types";
|
|
3
|
+
type BuildCustomTypeLibraryDirectoryPathArgs = {
|
|
4
|
+
helpers: SliceMachineContext<PluginOptions>["helpers"];
|
|
5
|
+
};
|
|
6
|
+
export declare const buildCustomTypeLibraryDirectoryPath: (args: BuildCustomTypeLibraryDirectoryPathArgs) => string;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildCustomTypeLibraryDirectoryPath.js","sources":["../../../src/lib/buildCustomTypeLibraryDirectoryPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\n\nimport { PluginOptions } from \"../types\";\n\ntype BuildCustomTypeLibraryDirectoryPathArgs = {\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildCustomTypeLibraryDirectoryPath = (\n\targs: BuildCustomTypeLibraryDirectoryPathArgs,\n): string => {\n\treturn args.helpers.joinPathFromRoot(\"customtypes\");\n};\n"],"names":[],"mappings":"AAQa,MAAA,sCAAsC,CAClD,SACW;AACJ,SAAA,KAAK,QAAQ,iBAAiB,aAAa;AACnD;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const buildSliceDirectoryPath = require("./buildSliceDirectoryPath.cjs");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
|
|
22
|
+
const buildSliceAssetPath = async (args) => {
|
|
23
|
+
const { model } = await args.actions.readSliceModel({
|
|
24
|
+
libraryID: args.libraryID,
|
|
25
|
+
sliceID: args.sliceID
|
|
26
|
+
});
|
|
27
|
+
return path__namespace.join(buildSliceDirectoryPath.buildSliceDirectoryPath({
|
|
28
|
+
libraryID: args.libraryID,
|
|
29
|
+
model,
|
|
30
|
+
helpers: args.helpers
|
|
31
|
+
}), args.assetID);
|
|
32
|
+
};
|
|
33
|
+
exports.buildSliceAssetPath = buildSliceAssetPath;
|
|
34
|
+
//# sourceMappingURL=buildSliceAssetPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSliceAssetPath.cjs","sources":["../../../src/lib/buildSliceAssetPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildSliceDirectoryPath } from \"./buildSliceDirectoryPath\";\n\ntype BuildSliceAssetPathArgs = {\n\tlibraryID: string;\n\tsliceID: string;\n\tassetID: string;\n\tactions: SliceMachineContext<PluginOptions>[\"actions\"];\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildSliceAssetPath = async (\n\targs: BuildSliceAssetPathArgs,\n): Promise<string> => {\n\tconst { model } = await args.actions.readSliceModel({\n\t\tlibraryID: args.libraryID,\n\t\tsliceID: args.sliceID,\n\t});\n\n\treturn path.join(\n\t\tbuildSliceDirectoryPath({\n\t\t\tlibraryID: args.libraryID,\n\t\t\tmodel,\n\t\t\thelpers: args.helpers,\n\t\t}),\n\t\targs.assetID,\n\t);\n};\n"],"names":["path","buildSliceDirectoryPath"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAea,MAAA,sBAAsB,OAClC,SACoB;AACpB,QAAM,EAAE,MAAK,IAAK,MAAM,KAAK,QAAQ,eAAe;AAAA,IACnD,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK;AAAA,EAAA,CACd;AAEM,SAAAA,gBAAK,KACXC,gDAAwB;AAAA,IACvB,WAAW,KAAK;AAAA,IAChB;AAAA,IACA,SAAS,KAAK;AAAA,EAAA,CACd,GACD,KAAK,OAAO;AAEd;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PluginOptions } from "../types";
|
|
3
|
+
type BuildSliceAssetPathArgs = {
|
|
4
|
+
libraryID: string;
|
|
5
|
+
sliceID: string;
|
|
6
|
+
assetID: string;
|
|
7
|
+
actions: SliceMachineContext<PluginOptions>["actions"];
|
|
8
|
+
helpers: SliceMachineContext<PluginOptions>["helpers"];
|
|
9
|
+
};
|
|
10
|
+
export declare const buildSliceAssetPath: (args: BuildSliceAssetPathArgs) => Promise<string>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { buildSliceDirectoryPath } from "./buildSliceDirectoryPath.js";
|
|
3
|
+
const buildSliceAssetPath = async (args) => {
|
|
4
|
+
const { model } = await args.actions.readSliceModel({
|
|
5
|
+
libraryID: args.libraryID,
|
|
6
|
+
sliceID: args.sliceID
|
|
7
|
+
});
|
|
8
|
+
return path.join(buildSliceDirectoryPath({
|
|
9
|
+
libraryID: args.libraryID,
|
|
10
|
+
model,
|
|
11
|
+
helpers: args.helpers
|
|
12
|
+
}), args.assetID);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
buildSliceAssetPath
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=buildSliceAssetPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSliceAssetPath.js","sources":["../../../src/lib/buildSliceAssetPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildSliceDirectoryPath } from \"./buildSliceDirectoryPath\";\n\ntype BuildSliceAssetPathArgs = {\n\tlibraryID: string;\n\tsliceID: string;\n\tassetID: string;\n\tactions: SliceMachineContext<PluginOptions>[\"actions\"];\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildSliceAssetPath = async (\n\targs: BuildSliceAssetPathArgs,\n): Promise<string> => {\n\tconst { model } = await args.actions.readSliceModel({\n\t\tlibraryID: args.libraryID,\n\t\tsliceID: args.sliceID,\n\t});\n\n\treturn path.join(\n\t\tbuildSliceDirectoryPath({\n\t\t\tlibraryID: args.libraryID,\n\t\t\tmodel,\n\t\t\thelpers: args.helpers,\n\t\t}),\n\t\targs.assetID,\n\t);\n};\n"],"names":[],"mappings":";;AAea,MAAA,sBAAsB,OAClC,SACoB;AACpB,QAAM,EAAE,MAAK,IAAK,MAAM,KAAK,QAAQ,eAAe;AAAA,IACnD,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK;AAAA,EAAA,CACd;AAEM,SAAA,KAAK,KACX,wBAAwB;AAAA,IACvB,WAAW,KAAK;AAAA,IAChB;AAAA,IACA,SAAS,KAAK;AAAA,EAAA,CACd,GACD,KAAK,OAAO;AAEd;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const buildSliceLibraryDirectoryPath = require("./buildSliceLibraryDirectoryPath.cjs");
|
|
5
|
+
const pascalCase = require("./pascalCase.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
|
|
23
|
+
const buildSliceDirectoryPath = (args) => {
|
|
24
|
+
return path__namespace.join(buildSliceLibraryDirectoryPath.buildSliceLibraryDirectoryPath({
|
|
25
|
+
libraryID: args.libraryID,
|
|
26
|
+
helpers: args.helpers
|
|
27
|
+
}), pascalCase.pascalCase(args.model.name));
|
|
28
|
+
};
|
|
29
|
+
exports.buildSliceDirectoryPath = buildSliceDirectoryPath;
|
|
30
|
+
//# sourceMappingURL=buildSliceDirectoryPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSliceDirectoryPath.cjs","sources":["../../../src/lib/buildSliceDirectoryPath.ts"],"sourcesContent":["import type { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\nimport { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildSliceLibraryDirectoryPath } from \"./buildSliceLibraryDirectoryPath\";\nimport { pascalCase } from \"./pascalCase\";\n\ntype BuildSliceDirectoryPathArgs = {\n\tlibraryID: string;\n\tmodel: SharedSlice;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildSliceDirectoryPath = (\n\targs: BuildSliceDirectoryPathArgs,\n): string => {\n\treturn path.join(\n\t\tbuildSliceLibraryDirectoryPath({\n\t\t\tlibraryID: args.libraryID,\n\t\t\thelpers: args.helpers,\n\t\t}),\n\t\tpascalCase(args.model.name),\n\t);\n};\n"],"names":["path","buildSliceLibraryDirectoryPath","pascalCase"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAea,MAAA,0BAA0B,CACtC,SACW;AACJ,SAAAA,gBAAK,KACXC,8DAA+B;AAAA,IAC9B,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK;AAAA,EACd,CAAA,GACDC,WAAAA,WAAW,KAAK,MAAM,IAAI,CAAC;AAE7B;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
3
|
+
import { PluginOptions } from "../types";
|
|
4
|
+
type BuildSliceDirectoryPathArgs = {
|
|
5
|
+
libraryID: string;
|
|
6
|
+
model: SharedSlice;
|
|
7
|
+
helpers: SliceMachineContext<PluginOptions>["helpers"];
|
|
8
|
+
};
|
|
9
|
+
export declare const buildSliceDirectoryPath: (args: BuildSliceDirectoryPathArgs) => string;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { buildSliceLibraryDirectoryPath } from "./buildSliceLibraryDirectoryPath.js";
|
|
3
|
+
import { pascalCase } from "./pascalCase.js";
|
|
4
|
+
const buildSliceDirectoryPath = (args) => {
|
|
5
|
+
return path.join(buildSliceLibraryDirectoryPath({
|
|
6
|
+
libraryID: args.libraryID,
|
|
7
|
+
helpers: args.helpers
|
|
8
|
+
}), pascalCase(args.model.name));
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
buildSliceDirectoryPath
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=buildSliceDirectoryPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSliceDirectoryPath.js","sources":["../../../src/lib/buildSliceDirectoryPath.ts"],"sourcesContent":["import type { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\nimport { SliceMachineContext } from \"@slicemachine/plugin-kit\";\nimport * as path from \"node:path\";\n\nimport { PluginOptions } from \"../types\";\n\nimport { buildSliceLibraryDirectoryPath } from \"./buildSliceLibraryDirectoryPath\";\nimport { pascalCase } from \"./pascalCase\";\n\ntype BuildSliceDirectoryPathArgs = {\n\tlibraryID: string;\n\tmodel: SharedSlice;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildSliceDirectoryPath = (\n\targs: BuildSliceDirectoryPathArgs,\n): string => {\n\treturn path.join(\n\t\tbuildSliceLibraryDirectoryPath({\n\t\t\tlibraryID: args.libraryID,\n\t\t\thelpers: args.helpers,\n\t\t}),\n\t\tpascalCase(args.model.name),\n\t);\n};\n"],"names":[],"mappings":";;;AAea,MAAA,0BAA0B,CACtC,SACW;AACJ,SAAA,KAAK,KACX,+BAA+B;AAAA,IAC9B,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK;AAAA,EACd,CAAA,GACD,WAAW,KAAK,MAAM,IAAI,CAAC;AAE7B;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildSliceLibraryDirectoryPath = (args) => {
|
|
4
|
+
return args.helpers.joinPathFromRoot(args.libraryID);
|
|
5
|
+
};
|
|
6
|
+
exports.buildSliceLibraryDirectoryPath = buildSliceLibraryDirectoryPath;
|
|
7
|
+
//# sourceMappingURL=buildSliceLibraryDirectoryPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSliceLibraryDirectoryPath.cjs","sources":["../../../src/lib/buildSliceLibraryDirectoryPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\n\nimport { PluginOptions } from \"../types\";\n\ntype BuildSliceLibraryDirectoryPathArgs = {\n\tlibraryID: string;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildSliceLibraryDirectoryPath = (\n\targs: BuildSliceLibraryDirectoryPathArgs,\n): string => {\n\treturn args.helpers.joinPathFromRoot(args.libraryID);\n};\n"],"names":[],"mappings":";;AASa,MAAA,iCAAiC,CAC7C,SACW;AACX,SAAO,KAAK,QAAQ,iBAAiB,KAAK,SAAS;AACpD;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PluginOptions } from "../types";
|
|
3
|
+
type BuildSliceLibraryDirectoryPathArgs = {
|
|
4
|
+
libraryID: string;
|
|
5
|
+
helpers: SliceMachineContext<PluginOptions>["helpers"];
|
|
6
|
+
};
|
|
7
|
+
export declare const buildSliceLibraryDirectoryPath: (args: BuildSliceLibraryDirectoryPathArgs) => string;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSliceLibraryDirectoryPath.js","sources":["../../../src/lib/buildSliceLibraryDirectoryPath.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\n\nimport { PluginOptions } from \"../types\";\n\ntype BuildSliceLibraryDirectoryPathArgs = {\n\tlibraryID: string;\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n};\n\nexport const buildSliceLibraryDirectoryPath = (\n\targs: BuildSliceLibraryDirectoryPathArgs,\n): string => {\n\treturn args.helpers.joinPathFromRoot(args.libraryID);\n};\n"],"names":[],"mappings":"AASa,MAAA,iCAAiC,CAC7C,SACW;AACX,SAAO,KAAK,QAAQ,iBAAiB,KAAK,SAAS;AACpD;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const checkPathExists = require("./checkPathExists.cjs");
|
|
4
|
+
const checkIsTypeScriptProject = async (args) => {
|
|
5
|
+
const tsConfigPath = args.helpers.joinPathFromRoot("tsconfig.json");
|
|
6
|
+
return args.options.typescript ?? await checkPathExists.checkPathExists(tsConfigPath);
|
|
7
|
+
};
|
|
8
|
+
exports.checkIsTypeScriptProject = checkIsTypeScriptProject;
|
|
9
|
+
//# sourceMappingURL=checkIsTypeScriptProject.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkIsTypeScriptProject.cjs","sources":["../../../src/lib/checkIsTypeScriptProject.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\n\nimport { PluginOptions } from \"../types\";\nimport { checkPathExists } from \"./checkPathExists\";\n\ntype CheckIsTypeScriptProjectArgs = {\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n\toptions: SliceMachineContext<PluginOptions>[\"options\"];\n};\n\nexport const checkIsTypeScriptProject = async (\n\targs: CheckIsTypeScriptProjectArgs,\n): Promise<boolean> => {\n\tconst tsConfigPath = args.helpers.joinPathFromRoot(\"tsconfig.json\");\n\n\treturn args.options.typescript ?? (await checkPathExists(tsConfigPath));\n};\n"],"names":["checkPathExists"],"mappings":";;;AAUa,MAAA,2BAA2B,OACvC,SACqB;AACrB,QAAM,eAAe,KAAK,QAAQ,iBAAiB,eAAe;AAElE,SAAO,KAAK,QAAQ,cAAe,MAAMA,gCAAgB,YAAY;AACtE;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PluginOptions } from "../types";
|
|
3
|
+
type CheckIsTypeScriptProjectArgs = {
|
|
4
|
+
helpers: SliceMachineContext<PluginOptions>["helpers"];
|
|
5
|
+
options: SliceMachineContext<PluginOptions>["options"];
|
|
6
|
+
};
|
|
7
|
+
export declare const checkIsTypeScriptProject: (args: CheckIsTypeScriptProjectArgs) => Promise<boolean>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { checkPathExists } from "./checkPathExists.js";
|
|
2
|
+
const checkIsTypeScriptProject = async (args) => {
|
|
3
|
+
const tsConfigPath = args.helpers.joinPathFromRoot("tsconfig.json");
|
|
4
|
+
return args.options.typescript ?? await checkPathExists(tsConfigPath);
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
checkIsTypeScriptProject
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=checkIsTypeScriptProject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkIsTypeScriptProject.js","sources":["../../../src/lib/checkIsTypeScriptProject.ts"],"sourcesContent":["import { SliceMachineContext } from \"@slicemachine/plugin-kit\";\n\nimport { PluginOptions } from \"../types\";\nimport { checkPathExists } from \"./checkPathExists\";\n\ntype CheckIsTypeScriptProjectArgs = {\n\thelpers: SliceMachineContext<PluginOptions>[\"helpers\"];\n\toptions: SliceMachineContext<PluginOptions>[\"options\"];\n};\n\nexport const checkIsTypeScriptProject = async (\n\targs: CheckIsTypeScriptProjectArgs,\n): Promise<boolean> => {\n\tconst tsConfigPath = args.helpers.joinPathFromRoot(\"tsconfig.json\");\n\n\treturn args.options.typescript ?? (await checkPathExists(tsConfigPath));\n};\n"],"names":[],"mappings":";AAUa,MAAA,2BAA2B,OACvC,SACqB;AACrB,QAAM,eAAe,KAAK,QAAQ,iBAAiB,eAAe;AAElE,SAAO,KAAK,QAAQ,cAAe,MAAM,gBAAgB,YAAY;AACtE;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fs = require("node:fs/promises");
|
|
4
|
+
function _interopNamespaceDefault(e) {
|
|
5
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
6
|
+
if (e) {
|
|
7
|
+
for (const k in e) {
|
|
8
|
+
if (k !== "default") {
|
|
9
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: () => e[k]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
n.default = e;
|
|
18
|
+
return Object.freeze(n);
|
|
19
|
+
}
|
|
20
|
+
const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
21
|
+
const checkPathExists = async (path) => {
|
|
22
|
+
try {
|
|
23
|
+
await fs__namespace.access(path);
|
|
24
|
+
return true;
|
|
25
|
+
} catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.checkPathExists = checkPathExists;
|
|
30
|
+
//# sourceMappingURL=checkPathExists.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkPathExists.cjs","sources":["../../../src/lib/checkPathExists.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport { PathLike } from \"node:fs\";\n\nexport const checkPathExists = async (path: PathLike): Promise<boolean> => {\n\ttry {\n\t\tawait fs.access(path);\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n"],"names":["fs"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGa,MAAA,kBAAkB,OAAO,SAAoC;AACrE,MAAA;AACG,UAAAA,cAAG,OAAO,IAAI;AAEb,WAAA;AAAA,EAAA,QACN;AACM,WAAA;AAAA,EACP;AACF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkPathExists.js","sources":["../../../src/lib/checkPathExists.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\nimport { PathLike } from \"node:fs\";\n\nexport const checkPathExists = async (path: PathLike): Promise<boolean> => {\n\ttry {\n\t\tawait fs.access(path);\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n"],"names":[],"mappings":";AAGa,MAAA,kBAAkB,OAAO,SAAoC;AACrE,MAAA;AACG,UAAA,GAAG,OAAO,IAAI;AAEb,WAAA;AAAA,EAAA,QACN;AACM,WAAA;AAAA,EACP;AACF;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const isSharedSliceModel = (input) => {
|
|
4
|
+
return typeof input === "object" && input !== null && "type" in input && input.type === "SharedSlice" && typeof input.id === "string";
|
|
5
|
+
};
|
|
6
|
+
exports.isSharedSliceModel = isSharedSliceModel;
|
|
7
|
+
//# sourceMappingURL=isSharedSliceModel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSharedSliceModel.cjs","sources":["../../../src/lib/isSharedSliceModel.ts"],"sourcesContent":["import type { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\n\nexport const isSharedSliceModel = (\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\tinput: any,\n): input is SharedSlice => {\n\treturn (\n\t\ttypeof input === \"object\" &&\n\t\tinput !== null &&\n\t\t\"type\" in input &&\n\t\tinput.type === \"SharedSlice\" &&\n\t\ttypeof input.id === \"string\"\n\t);\n};\n"],"names":[],"mappings":";;AAEa,MAAA,qBAAqB,CAEjC,UACyB;AACzB,SACC,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,iBACf,OAAO,MAAM,OAAO;AAEtB;;"}
|