@power-plant/prisma-input 0.0.74 → 0.0.75
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/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +1 -1
- package/dist/input.mjs.map +1 -1
- package/dist/utilities.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./utilities.cjs"),n=require("./input.cjs");let r=require("@power-plant/core"),i=require("@power-plant/prisma-schema");i=e.t(i,1);var a=(0,r.defineInput)({meta:{name:`prisma-input`,description:"An input extension that reads Prisma schema (`.prisma`) files and converts them into a Prisma DMMF document using `@prisma/internals`.",usage:`Reads one or more Prisma schema files (or globs) configured via inputPath and returns the DMMF document.`,version:`0.0.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./utilities.cjs"),n=require("./input.cjs");let r=require("@power-plant/core"),i=require("@power-plant/prisma-schema");i=e.t(i,1);var a=(0,r.defineInput)({meta:{name:`prisma-input`,description:"An input extension that reads Prisma schema (`.prisma`) files and converts them into a Prisma DMMF document using `@prisma/internals`.",usage:`Reads one or more Prisma schema files (or globs) configured via inputPath and returns the DMMF document.`,version:`0.0.75`,tags:[`prisma`,`dmmf`],links:[{href:`https://www.prisma.io`,description:`Prisma`},{href:`https://www.prisma.io/docs/orm/prisma-schema`,description:`Prisma Schema`},{href:`https://github.com/prisma/prisma`,description:`Prisma GitHub Repository`}]},schema:i.default,input:n.input});exports.default=a,exports.formatLoadError=t.formatLoadError,exports.input=n.input,exports.normalizeInputPaths=t.normalizeInputPaths,exports.toAbsolutePath=t.toAbsolutePath,exports.toFileUrl=t.toFileUrl,exports.toSchemaFiles=t.toSchemaFiles;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{formatLoadError as e,normalizeInputPaths as t,toAbsolutePath as n,toFileUrl as r,toSchemaFiles as i}from"./utilities.mjs";import{input as a}from"./input.mjs";import{defineInput as o}from"@power-plant/core";import s from"@power-plant/prisma-schema";var c=o({meta:{name:`prisma-input`,description:"An input extension that reads Prisma schema (`.prisma`) files and converts them into a Prisma DMMF document using `@prisma/internals`.",usage:`Reads one or more Prisma schema files (or globs) configured via inputPath and returns the DMMF document.`,version:`0.0.
|
|
1
|
+
import{formatLoadError as e,normalizeInputPaths as t,toAbsolutePath as n,toFileUrl as r,toSchemaFiles as i}from"./utilities.mjs";import{input as a}from"./input.mjs";import{defineInput as o}from"@power-plant/core";import s from"@power-plant/prisma-schema";var c=o({meta:{name:`prisma-input`,description:"An input extension that reads Prisma schema (`.prisma`) files and converts them into a Prisma DMMF document using `@prisma/internals`.",usage:`Reads one or more Prisma schema files (or globs) configured via inputPath and returns the DMMF document.`,version:`0.0.75`,tags:[`prisma`,`dmmf`],links:[{href:`https://www.prisma.io`,description:`Prisma`},{href:`https://www.prisma.io/docs/orm/prisma-schema`,description:`Prisma Schema`},{href:`https://github.com/prisma/prisma`,description:`Prisma GitHub Repository`}]},schema:s,input:a});export{c as default,e as formatLoadError,a as input,t as normalizeInputPaths,n as toAbsolutePath,r as toFileUrl,i as toSchemaFiles};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["packageJson.version","schema","src_default","defineInput","formatLoadError","input","normalizeInputPaths","toAbsolutePath","toFileUrl","toSchemaFiles"],"sources":[],"mappings":""}
|
package/dist/input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./utilities.cjs");let n=require("@stryke/convert/to-array"),r=require("node:path"),i=require("@power-plant/core"),a=require("@prisma/internals");a=e.t(a,1);let o=require("@stryke/path/join-paths"),s=require("node:fs/promises");const{getDMMF:c}=a.default;async function l(e,n){let i=t.toAbsolutePath(e,n);if(i.includes(`*`)||i.includes(`?`)){let e=[];for await(let t of(0,s.glob)(i))t.endsWith(`.prisma`)&&e.push((0,r.isAbsolute)(t)?t:(0,r.resolve)(n,t));return e}let a=await(0,s.stat)(i);if(a.isFile())return[i];if(a.isDirectory()){let e=await(0,s.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let e=(0,o.joinPaths)(i,r.name);r.isFile()&&r.name.endsWith(`.prisma`)?t.push(e):r.isDirectory()&&r.name!==`node_modules`&&t.push(...await l(e,n))}return t}return[]}async function u(e){let{inputPath:r}=e,{cwd:a}=(0,i.useExecution)();try{let e=t.normalizeInputPaths(r),i=(await Promise.all(e.map(async e=>l(e,a)))).flat(),o=[...new Set(i)];if(o.length===0)throw Error(`No Prisma schema files found for inputPath: ${(0,n.toArray)(r).map(String).join(`, `)}`);let u
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./utilities.cjs");let n=require("@stryke/convert/to-array"),r=require("node:path"),i=require("@power-plant/core"),a=require("@prisma/internals");a=e.t(a,1);let o=require("@stryke/path/join-paths"),s=require("node:fs/promises");const{getDMMF:c}=a.default;async function l(e,n){let i=t.toAbsolutePath(e,n);if(i.includes(`*`)||i.includes(`?`)){let e=[];for await(let t of(0,s.glob)(i))t.endsWith(`.prisma`)&&e.push((0,r.isAbsolute)(t)?t:(0,r.resolve)(n,t));return e}let a=await(0,s.stat)(i);if(a.isFile())return[i];if(a.isDirectory()){let e=await(0,s.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let e=(0,o.joinPaths)(i,r.name);r.isFile()&&r.name.endsWith(`.prisma`)?t.push(e):r.isDirectory()&&r.name!==`node_modules`&&t.push(...await l(e,n))}return t}return[]}async function u(e){let{inputPath:r}=e,{cwd:a}=(0,i.useExecution)();try{let e=t.normalizeInputPaths(r),i=(await Promise.all(e.map(async e=>l(e,a)))).flat(),o=[...new Set(i)];if(o.length===0)throw Error(`No Prisma schema files found for inputPath: ${(0,n.toArray)(r).map(String).join(`, `)}`);let u=/* @__PURE__ */ new Map;await Promise.all(o.map(async e=>{u.set(e,await(0,s.readFile)(e,`utf8`))}));let d=t.toSchemaFiles(o,u);return await c({datamodel:d})}catch(e){throw Error([`Failed to load Prisma schema from ${(0,n.toArray)(r).map(String).join(`, `)}:`,t.formatLoadError(e),``,`Supported schema sources include:`,"- Local `.prisma` files","- Directories containing `.prisma` files","- Glob expressions matching `.prisma` files"].join(`
|
|
2
2
|
`))}}exports.input=u;
|
package/dist/input.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{formatLoadError as e,normalizeInputPaths as t,toAbsolutePath as n,toSchemaFiles as r}from"./utilities.mjs";import{toArray as i}from"@stryke/convert/to-array";import{isAbsolute as a,resolve as o}from"node:path";import{useExecution as s}from"@power-plant/core";import c from"@prisma/internals";import{joinPaths as l}from"@stryke/path/join-paths";import{glob as u,readFile as d,readdir as f,stat as p}from"node:fs/promises";const{getDMMF:m}=c;async function h(e,t){let r=n(e,t);if(r.includes(`*`)||r.includes(`?`)){let e=[];for await(let n of u(r))n.endsWith(`.prisma`)&&e.push(a(n)?n:o(t,n));return e}let i=await p(r);if(i.isFile())return[r];if(i.isDirectory()){let e=await f(r,{withFileTypes:!0}),n=[];for(let i of e){let e=l(r,i.name);i.isFile()&&i.name.endsWith(`.prisma`)?n.push(e):i.isDirectory()&&i.name!==`node_modules`&&n.push(...await h(e,t))}return n}return[]}async function g(n){let{inputPath:a}=n,{cwd:o}=s();try{let e=t(a),n=(await Promise.all(e.map(async e=>h(e,o)))).flat(),s=[...new Set(n)];if(s.length===0)throw Error(`No Prisma schema files found for inputPath: ${i(a).map(String).join(`, `)}`);let c
|
|
1
|
+
import{formatLoadError as e,normalizeInputPaths as t,toAbsolutePath as n,toSchemaFiles as r}from"./utilities.mjs";import{toArray as i}from"@stryke/convert/to-array";import{isAbsolute as a,resolve as o}from"node:path";import{useExecution as s}from"@power-plant/core";import c from"@prisma/internals";import{joinPaths as l}from"@stryke/path/join-paths";import{glob as u,readFile as d,readdir as f,stat as p}from"node:fs/promises";const{getDMMF:m}=c;async function h(e,t){let r=n(e,t);if(r.includes(`*`)||r.includes(`?`)){let e=[];for await(let n of u(r))n.endsWith(`.prisma`)&&e.push(a(n)?n:o(t,n));return e}let i=await p(r);if(i.isFile())return[r];if(i.isDirectory()){let e=await f(r,{withFileTypes:!0}),n=[];for(let i of e){let e=l(r,i.name);i.isFile()&&i.name.endsWith(`.prisma`)?n.push(e):i.isDirectory()&&i.name!==`node_modules`&&n.push(...await h(e,t))}return n}return[]}async function g(n){let{inputPath:a}=n,{cwd:o}=s();try{let e=t(a),n=(await Promise.all(e.map(async e=>h(e,o)))).flat(),s=[...new Set(n)];if(s.length===0)throw Error(`No Prisma schema files found for inputPath: ${i(a).map(String).join(`, `)}`);let c=/* @__PURE__ */ new Map;await Promise.all(s.map(async e=>{c.set(e,await d(e,`utf8`))}));let l=r(s,c);return await m({datamodel:l})}catch(t){throw Error([`Failed to load Prisma schema from ${i(a).map(String).join(`, `)}:`,e(t),``,`Supported schema sources include:`,"- Local `.prisma` files","- Directories containing `.prisma` files","- Glob expressions matching `.prisma` files"].join(`
|
|
2
2
|
`))}}export{g as input};
|
|
3
3
|
//# sourceMappingURL=input.mjs.map
|
package/dist/input.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"input.mjs","names":["prismaInternals","collectPrismaFiles","absolute","toAbsolutePath","reference","cwd","matched","entry","glob","isAbsolute","resolve","info","stat","entries","readdir","files","child","joinPaths","input","options","useExecution","references","normalizeInputPaths","inputPath","schemaPaths","uniquePaths","toArray","contents","path","readFile","schemaFiles","toSchemaFiles","getDMMF","error","formatLoadError"],"sources":[],"mappings":""}
|
package/dist/utilities.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"utilities.mjs","names":["formatLoadError","error","toAbsolutePath","isString","reference","isAbsolute","resolve","cwd","toSchemaFiles","paths","content","contents","path","toFileUrl","pathToFileURL","normalizeInputPaths","toArray","inputPath"],"sources":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/prisma-input",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.75",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Power Plant input for reading Prisma schema files into a DMMF document.",
|
|
6
6
|
"keywords": [
|
|
@@ -110,21 +110,21 @@
|
|
|
110
110
|
"typings": "dist/index.d.mts",
|
|
111
111
|
"files": ["dist"],
|
|
112
112
|
"dependencies": {
|
|
113
|
-
"@power-plant/core": "^0.0.
|
|
113
|
+
"@power-plant/core": "^0.0.94",
|
|
114
114
|
"@power-plant/prisma-schema": "^0.0.1",
|
|
115
|
-
"@power-plant/schema": "^0.0.
|
|
115
|
+
"@power-plant/schema": "^0.0.92",
|
|
116
116
|
"@prisma/internals": "^6.19.3",
|
|
117
|
-
"@stryke/convert": "^0.7.
|
|
118
|
-
"@stryke/path": "^0.29.
|
|
119
|
-
"@stryke/resolve": "^0.0.
|
|
120
|
-
"@stryke/type-checks": "^0.6.
|
|
121
|
-
"@stryke/types": "^0.12.
|
|
117
|
+
"@stryke/convert": "^0.7.47",
|
|
118
|
+
"@stryke/path": "^0.29.43",
|
|
119
|
+
"@stryke/resolve": "^0.0.33",
|
|
120
|
+
"@stryke/type-checks": "^0.6.49",
|
|
121
|
+
"@stryke/types": "^0.12.44"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
125
|
-
"@types/node": "^25.9.
|
|
126
|
-
"powerlines": "^0.47.
|
|
124
|
+
"@powerlines/plugin-tsdown": "^0.1.615",
|
|
125
|
+
"@types/node": "^25.9.9",
|
|
126
|
+
"powerlines": "^0.47.214"
|
|
127
127
|
},
|
|
128
128
|
"publishConfig": { "access": "public" },
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "082d4ef1a20adf7d4f5e11bf1f4f4efcf191dec0"
|
|
130
130
|
}
|