@power-plant/unstorage-input 0.0.54 → 0.0.60

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 CHANGED
@@ -1 +1 @@
1
- const e=require("./input.cjs");let t=require("@power-plant/core"),n=require("@stryke/type-checks/is-string"),r=require("@stryke/type-checks/is-url"),i=require("@stryke/resolve/type-checks");var a=(0,t.defineInput)({meta:{name:`unstorage-input`,description:`An input extension that reads the specification from an Unstorage driver.`,readFrom:(e,t)=>`Reads the ${e.name?`${e.name} `:``}specification from the file "${(0,n.isString)(t.inputPath)?t.inputPath:(0,r.isURL)(t.inputPath)?t.inputPath.toString():(0,i.isFileReference)(t.inputPath)?t.inputPath.file:`Unknown Type`}"${t.inputStorage&&t.inputStorage.getMount((0,n.isString)(t.inputPath)?t.inputPath:(0,r.isURL)(t.inputPath)?t.inputPath.toString():(0,i.isFileReference)(t.inputPath)?t.inputPath.file:void 0)?.driver.name?` using the "${t.inputStorage.getMount((0,n.isString)(t.inputPath)?t.inputPath:(0,r.isURL)(t.inputPath)?t.inputPath.toString():(0,i.isFileReference)(t.inputPath)?t.inputPath.file:void 0)?.driver.name}" Unstorage driver`:``}.`,version:`0.0.54`,tags:[`unstorage`,`input`],links:[{href:`https://unstorage.unjs.io`,description:`Unstorage documentation`},{href:`https://unstorage.unjs.io/drivers`,description:`Unstorage Drivers documentation`},{href:`https://github.com/unjs/unstorage`,description:`Unstorage GitHub repository`}]},input:e.input});module.exports=a;
1
+ const e=require("./input.cjs");let t=require("@power-plant/core"),n=require("@stryke/type-checks/is-string"),r=require("@stryke/type-checks/is-url"),i=require("@stryke/resolve/type-checks");var a=(0,t.defineInput)({meta:{name:`unstorage-input`,description:`An input extension that reads the specification from an Unstorage driver.`,readFrom:(e,t)=>`Reads the ${e.name?`${e.name} `:``}specification from the file "${(0,n.isString)(t.inputPath)?t.inputPath:(0,r.isURL)(t.inputPath)?t.inputPath.toString():(0,i.isFileReference)(t.inputPath)?t.inputPath.file:`Unknown Type`}"${t.inputStorage&&t.inputStorage.getMount((0,n.isString)(t.inputPath)?t.inputPath:(0,r.isURL)(t.inputPath)?t.inputPath.toString():(0,i.isFileReference)(t.inputPath)?t.inputPath.file:void 0)?.driver.name?` using the "${t.inputStorage.getMount((0,n.isString)(t.inputPath)?t.inputPath:(0,r.isURL)(t.inputPath)?t.inputPath.toString():(0,i.isFileReference)(t.inputPath)?t.inputPath.file:void 0)?.driver.name}" Unstorage driver`:``}.`,version:`0.0.60`,tags:[`unstorage`,`input`],links:[{href:`https://unstorage.unjs.io`,description:`Unstorage documentation`},{href:`https://unstorage.unjs.io/drivers`,description:`Unstorage Drivers documentation`},{href:`https://github.com/unjs/unstorage`,description:`Unstorage GitHub repository`}]},input:e.input});module.exports=a;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{input as e}from"./input.mjs";import{defineInput as t}from"@power-plant/core";import{isString as n}from"@stryke/type-checks/is-string";import{isURL as r}from"@stryke/type-checks/is-url";import{isFileReference as i}from"@stryke/resolve/type-checks";var a=t({meta:{name:`unstorage-input`,description:`An input extension that reads the specification from an Unstorage driver.`,readFrom:(e,t)=>`Reads the ${e.name?`${e.name} `:``}specification from the file "${n(t.inputPath)?t.inputPath:r(t.inputPath)?t.inputPath.toString():i(t.inputPath)?t.inputPath.file:`Unknown Type`}"${t.inputStorage&&t.inputStorage.getMount(n(t.inputPath)?t.inputPath:r(t.inputPath)?t.inputPath.toString():i(t.inputPath)?t.inputPath.file:void 0)?.driver.name?` using the "${t.inputStorage.getMount(n(t.inputPath)?t.inputPath:r(t.inputPath)?t.inputPath.toString():i(t.inputPath)?t.inputPath.file:void 0)?.driver.name}" Unstorage driver`:``}.`,version:`0.0.54`,tags:[`unstorage`,`input`],links:[{href:`https://unstorage.unjs.io`,description:`Unstorage documentation`},{href:`https://unstorage.unjs.io/drivers`,description:`Unstorage Drivers documentation`},{href:`https://github.com/unjs/unstorage`,description:`Unstorage GitHub repository`}]},input:e});export{a as default};
1
+ import{input as e}from"./input.mjs";import{defineInput as t}from"@power-plant/core";import{isString as n}from"@stryke/type-checks/is-string";import{isURL as r}from"@stryke/type-checks/is-url";import{isFileReference as i}from"@stryke/resolve/type-checks";var a=t({meta:{name:`unstorage-input`,description:`An input extension that reads the specification from an Unstorage driver.`,readFrom:(e,t)=>`Reads the ${e.name?`${e.name} `:``}specification from the file "${n(t.inputPath)?t.inputPath:r(t.inputPath)?t.inputPath.toString():i(t.inputPath)?t.inputPath.file:`Unknown Type`}"${t.inputStorage&&t.inputStorage.getMount(n(t.inputPath)?t.inputPath:r(t.inputPath)?t.inputPath.toString():i(t.inputPath)?t.inputPath.file:void 0)?.driver.name?` using the "${t.inputStorage.getMount(n(t.inputPath)?t.inputPath:r(t.inputPath)?t.inputPath.toString():i(t.inputPath)?t.inputPath.file:void 0)?.driver.name}" Unstorage driver`:``}.`,version:`0.0.60`,tags:[`unstorage`,`input`],links:[{href:`https://unstorage.unjs.io`,description:`Unstorage documentation`},{href:`https://unstorage.unjs.io/drivers`,description:`Unstorage Drivers documentation`},{href:`https://github.com/unjs/unstorage`,description:`Unstorage GitHub repository`}]},input:e});export{a as default};
2
2
  //# sourceMappingURL=index.mjs.map
package/dist/input.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("@power-plant/core"),l=require("@power-plant/schema/storage"),u=require("@stryke/path/find"),d=require("@stryke/resolve/load"),f=require("@stryke/type-checks/is-string"),p=require("@stryke/type-checks/is-url"),m=require("unstorage"),h=require("unstorage/drivers/fs-lite");h=s(h,1);async function g(e){let{inputPath:t,allowedExtensions:n,...r}=e,i=n?.map(e=>e.toLowerCase().replace(/^\./,``));if(i&&i.length>0&&(0,f.isString)(t)&&(0,u.findFileExtensionSafe)(t)&&!i.includes((0,u.findFileExtensionSafe)(t)))throw Error(`Invalid extension provided in input path: ${(0,u.findFileExtensionSafe)(t)}`);if(i&&i.length>0&&(0,p.isURL)(t)&&(0,u.findFileExtensionSafe)(t.toString())&&!i.includes((0,u.findFileExtensionSafe)(t.toString())))throw Error(`Invalid extension provided in input path: ${(0,u.findFileExtensionSafe)(t.toString())}`);let{storage:a}=(0,c.useExecution)(),o=e.inputStorage?e.inputStorage:e.inputPath?(0,m.createStorage)({driver:(0,h.default)({base:e.inputPath})}):a;return(0,d.load)(t,{...r,fs:(0,l.mapStorageToFileSystem)(o)})}exports.input=g;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@power-plant/core"),l=require("@power-plant/schema/storage"),u=require("@stryke/path/find"),d=require("@stryke/resolve/load"),f=require("@stryke/type-checks/is-string"),p=require("@stryke/type-checks/is-url"),m=require("unstorage"),h=require("unstorage/drivers/fs-lite");h=s(h,1);async function g(e){let{inputPath:t,allowedExtensions:n,...r}=e,i=n?.map(e=>e.toLowerCase().replace(/^\./,``));if(i&&i.length>0&&(0,f.isString)(t)&&(0,u.findFileExtensionSafe)(t)&&!i.includes((0,u.findFileExtensionSafe)(t)))throw Error(`Invalid extension provided in input path: ${(0,u.findFileExtensionSafe)(t)}`);if(i&&i.length>0&&(0,p.isURL)(t)&&(0,u.findFileExtensionSafe)(t.toString())&&!i.includes((0,u.findFileExtensionSafe)(t.toString())))throw Error(`Invalid extension provided in input path: ${(0,u.findFileExtensionSafe)(t.toString())}`);let{storage:a}=(0,c.useExecution)(),o=e.inputStorage?e.inputStorage:e.inputPath?(0,m.createStorage)({driver:(0,h.default)({base:e.inputPath})}):a;return(0,d.load)(t,{...r,fs:(0,l.mapStorageToFileSystem)(o)})}exports.input=g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/unstorage-input",
3
- "version": "0.0.54",
3
+ "version": "0.0.60",
4
4
  "private": false,
5
5
  "description": "A Power Plant input for reading the source specification from an Unstorage driver.",
6
6
  "keywords": [
@@ -95,8 +95,8 @@
95
95
  "typings": "dist/index.d.mts",
96
96
  "files": ["dist"],
97
97
  "dependencies": {
98
- "@power-plant/core": "^0.0.55",
99
- "@power-plant/schema": "^0.0.53",
98
+ "@power-plant/core": "^0.0.61",
99
+ "@power-plant/schema": "^0.0.59",
100
100
  "@stryke/path": "^0.29.25",
101
101
  "@stryke/resolve": "^0.0.14",
102
102
  "@stryke/type-checks": "^0.6.31",
@@ -104,10 +104,10 @@
104
104
  "unstorage": "^1.17.5"
105
105
  },
106
106
  "devDependencies": {
107
- "@powerlines/plugin-tsdown": "^0.1.575",
107
+ "@powerlines/plugin-tsdown": "^0.1.578",
108
108
  "@types/node": "^25.9.5",
109
- "powerlines": "^0.47.174"
109
+ "powerlines": "^0.47.177"
110
110
  },
111
111
  "publishConfig": { "access": "public" },
112
- "gitHead": "09e093f6c09d6b64e4d607604a9b85dea4b68277"
112
+ "gitHead": "f58905215edc6074bb852c90c0df9e62409e4185"
113
113
  }