@meteor-vite/plugin-zodern-relay 1.0.6 → 1.1.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/dist/Plugin.js +1 -1
- package/dist/Plugin.js.map +1 -1
- package/dist/Plugin.mjs +1 -1
- package/dist/Plugin.mjs.map +1 -1
- package/package.json +5 -7
- package/src/Plugin.ts +1 -1
package/dist/Plugin.js
CHANGED
|
@@ -74,7 +74,7 @@ async function zodernRelay(options) {
|
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
let arch = "web.browser.vite";
|
|
77
|
-
if (fileOptions?.ssr) {
|
|
77
|
+
if (fileOptions?.ssr || this.environment.name === "server") {
|
|
78
78
|
arch = "os.vite.ssr";
|
|
79
79
|
}
|
|
80
80
|
const transform = await (0, import_core.transformAsync)(code, {
|
package/dist/Plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Plugin.ts"],"sourcesContent":["import { transformAsync } from '@babel/core';\nimport FS from 'fs';\nimport Path from 'path';\nimport { type Plugin } from 'vite';\n\nconst cwd = process.cwd();\n\nexport default async function zodernRelay(options?: Options): Promise<Plugin> {\n const config = {\n directories: {\n methods: options?.directories?.methods || ['./imports/methods'],\n publications: options?.directories?.publications || ['./imports/publications'],\n },\n shouldTransform: options?.shouldTransform || (({ content }) => content.includes(options?.relayPackageId || 'meteor/zodern:relay')),\n } satisfies Options;\n \n const directories = [\n ...config.directories.methods.map((path) => ['methods', Path.relative(cwd, path)]),\n ...config.directories.publications.map((path) => ['publications', Path.relative(cwd, path)])\n ] as [RelayInfo['type'], string][];\n \n function resolveRelay(id: string): RelayInfo | undefined {\n const relativePath = Path.relative(cwd, id);\n for (const [type, directory] of directories) {\n if (!relativePath.startsWith(directory)) {\n continue;\n }\n return {\n id,\n type,\n relativePath,\n }\n }\n }\n \n return {\n name: 'zodern-relay',\n async load(filename, fileOptions) {\n const relay = resolveRelay(filename || '');\n \n if (!relay) {\n return;\n }\n \n const code = FS.readFileSync(filename, 'utf-8');\n \n // Prevent transforming files that don't use zodern:relay\n if (!config.shouldTransform({ content: code, id: filename })) {\n return;\n }\n \n let arch = 'web.browser.vite';\n \n if (fileOptions?.ssr) {\n arch = 'os.vite.ssr';\n }\n \n const transform = await transformAsync(code, {\n configFile: false,\n babelrc: false,\n filename,\n presets: ['@babel/preset-typescript'], // Add TypeScript preset\n plugins: ['@zodern/babel-plugin-meteor-relay'],\n caller: {\n name: '@meteor-vite/plugin-zodern-relay',\n \n // @ts-expect-error No type definition for this, but it's required by the Babel plugin.\n arch,\n }\n });\n \n if (!transform) {\n return;\n }\n \n let newCode = transform.code ?? '';\n \n // Rewrite any newly added imports to use the correct package ID.\n // Only applicable when using a fork of zodern:relay.\n if (options?.relayPackageId) {\n newCode = newCode.replace('meteor/zodern:relay', options.relayPackageId);\n }\n \n return {\n code: newCode,\n }\n }\n }\n \n \n}\nexport interface Options {\n directories?: {\n /**\n * Path to directories where your zodern:relay methods live\n * @default ['./imports/methods']\n */\n methods?: string[],\n \n /**\n * Path to the directories where your zodern:relay publications live.\n * @default ['./imports/publications']\n */\n publications?: string[],\n }\n /**\n * Specify a custom filter to determine whether a module should be transformed with zodern:relay.\n * Used to prevent unnecessary Babel transformations.\n * @default ({ content }) => content.includes('meteor/zodern:relay')\n * @param id\n */\n shouldTransform?: (file: { content: string, id: string }) => boolean;\n \n /**\n * If you're using a fork of zodern:relay, you should specify its Meteor import string here so imports\n * can be substituted with your fork. The Babel plugin currently injects a hardcoded import string for\n * client-code `zodern:relay/client`, so it's important we correct that before finishing the transform process.\n * @default 'meteor/zodern:relay'\n */\n relayPackageId?: string;\n}\n\ntype RelayInfo = {\n type: 'methods' | 'publications';\n id: string;\n relativePath: string;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA+B;AAC/B,gBAAe;AACf,kBAAiB;AAGj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S from 'fs';\nimport Path from 'path';\nimport { type Plugin } from 'vite';\n\nconst cwd = process.cwd();\n\nexport default async function zodernRelay(options?: Options): Promise<Plugin> {\n const config = {\n directories: {\n methods: options?.directories?.methods || ['./imports/methods'],\n publications: options?.directories?.publications || ['./imports/publications'],\n },\n shouldTransform: options?.shouldTransform || (({ content }) => content.includes(options?.relayPackageId || 'meteor/zodern:relay')),\n } satisfies Options;\n \n const directories = [\n ...config.directories.methods.map((path) => ['methods', Path.relative(cwd, path)]),\n ...config.directories.publications.map((path) => ['publications', Path.relative(cwd, path)])\n ] as [RelayInfo['type'], string][];\n \n function resolveRelay(id: string): RelayInfo | undefined {\n const relativePath = Path.relative(cwd, id);\n for (const [type, directory] of directories) {\n if (!relativePath.startsWith(directory)) {\n continue;\n }\n return {\n id,\n type,\n relativePath,\n }\n }\n }\n \n return {\n name: 'zodern-relay',\n async load(filename, fileOptions) {\n const relay = resolveRelay(filename || '');\n \n if (!relay) {\n return;\n }\n \n const code = FS.readFileSync(filename, 'utf-8');\n \n // Prevent transforming files that don't use zodern:relay\n if (!config.shouldTransform({ content: code, id: filename })) {\n return;\n }\n \n let arch = 'web.browser.vite';\n \n if (fileOptions?.ssr || this.environment.name === 'server') {\n arch = 'os.vite.ssr';\n }\n \n const transform = await transformAsync(code, {\n configFile: false,\n babelrc: false,\n filename,\n presets: ['@babel/preset-typescript'], // Add TypeScript preset\n plugins: ['@zodern/babel-plugin-meteor-relay'],\n caller: {\n name: '@meteor-vite/plugin-zodern-relay',\n \n // @ts-expect-error No type definition for this, but it's required by the Babel plugin.\n arch,\n }\n });\n \n if (!transform) {\n return;\n }\n \n let newCode = transform.code ?? '';\n \n // Rewrite any newly added imports to use the correct package ID.\n // Only applicable when using a fork of zodern:relay.\n if (options?.relayPackageId) {\n newCode = newCode.replace('meteor/zodern:relay', options.relayPackageId);\n }\n \n return {\n code: newCode,\n }\n }\n }\n \n \n}\nexport interface Options {\n directories?: {\n /**\n * Path to directories where your zodern:relay methods live\n * @default ['./imports/methods']\n */\n methods?: string[],\n \n /**\n * Path to the directories where your zodern:relay publications live.\n * @default ['./imports/publications']\n */\n publications?: string[],\n }\n /**\n * Specify a custom filter to determine whether a module should be transformed with zodern:relay.\n * Used to prevent unnecessary Babel transformations.\n * @default ({ content }) => content.includes('meteor/zodern:relay')\n * @param id\n */\n shouldTransform?: (file: { content: string, id: string }) => boolean;\n \n /**\n * If you're using a fork of zodern:relay, you should specify its Meteor import string here so imports\n * can be substituted with your fork. The Babel plugin currently injects a hardcoded import string for\n * client-code `zodern:relay/client`, so it's important we correct that before finishing the transform process.\n * @default 'meteor/zodern:relay'\n */\n relayPackageId?: string;\n}\n\ntype RelayInfo = {\n type: 'methods' | 'publications';\n id: string;\n relativePath: string;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA+B;AAC/B,gBAAe;AACf,kBAAiB;AAGjB,IAAM,MAAM,QAAQ,IAAI;AAExB,eAAO,YAAmC,SAAoC;AAC1E,QAAM,SAAS;AAAA,IACX,aAAa;AAAA,MACT,SAAS,SAAS,aAAa,WAAW,CAAC,mBAAmB;AAAA,MAC9D,cAAc,SAAS,aAAa,gBAAgB,CAAC,wBAAwB;AAAA,IACjF;AAAA,IACA,iBAAiB,SAAS,oBAAoB,CAAC,EAAE,QAAQ,MAAM,QAAQ,SAAS,SAAS,kBAAkB,qBAAqB;AAAA,EACpI;AAEA,QAAM,cAAc;AAAA,IAChB,GAAG,OAAO,YAAY,QAAQ,IAAI,CAAC,SAAS,CAAC,WAAW,YAAAA,QAAK,SAAS,KAAK,IAAI,CAAC,CAAC;AAAA,IACjF,GAAG,OAAO,YAAY,aAAa,IAAI,CAAC,SAAS,CAAC,gBAAgB,YAAAA,QAAK,SAAS,KAAK,IAAI,CAAC,CAAC;AAAA,EAC/F;AAEA,WAAS,aAAa,IAAmC;AACrD,UAAM,eAAe,YAAAA,QAAK,SAAS,KAAK,EAAE;AAC1C,eAAW,CAAC,MAAM,SAAS,KAAK,aAAa;AACzC,UAAI,CAAC,aAAa,WAAW,SAAS,GAAG;AACrC;AAAA,MACJ;AACA,aAAO;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AAAA,IACH,MAAM;AAAA,IACN,MAAM,KAAK,UAAU,aAAa;AAC9B,YAAM,QAAQ,aAAa,YAAY,EAAE;AAEzC,UAAI,CAAC,OAAO;AACR;AAAA,MACJ;AAEA,YAAM,OAAO,UAAAC,QAAG,aAAa,UAAU,OAAO;AAG9C,UAAI,CAAC,OAAO,gBAAgB,EAAE,SAAS,MAAM,IAAI,SAAS,CAAC,GAAG;AAC1D;AAAA,MACJ;AAEA,UAAI,OAAO;AAEX,UAAI,aAAa,OAAO,KAAK,YAAY,SAAS,UAAU;AACxD,eAAO;AAAA,MACX;AAEA,YAAM,YAAY,UAAM,4BAAe,MAAM;AAAA,QACzC,YAAY;AAAA,QACZ,SAAS;AAAA,QACT;AAAA,QACA,SAAS,CAAC,0BAA0B;AAAA;AAAA,QACpC,SAAS,CAAC,mCAAmC;AAAA,QAC7C,QAAQ;AAAA,UACJ,MAAM;AAAA;AAAA,UAGN;AAAA,QACJ;AAAA,MACJ,CAAC;AAED,UAAI,CAAC,WAAW;AACZ;AAAA,MACJ;AAEA,UAAI,UAAU,UAAU,QAAQ;AAIhC,UAAI,SAAS,gBAAgB;AACzB,kBAAU,QAAQ,QAAQ,uBAAuB,QAAQ,cAAc;AAAA,MAC3E;AAEA,aAAO;AAAA,QACH,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AAGJ;","names":["Path","FS"]}
|
package/dist/Plugin.mjs
CHANGED
package/dist/Plugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Plugin.ts"],"sourcesContent":["import { transformAsync } from '@babel/core';\nimport FS from 'fs';\nimport Path from 'path';\nimport { type Plugin } from 'vite';\n\nconst cwd = process.cwd();\n\nexport default async function zodernRelay(options?: Options): Promise<Plugin> {\n const config = {\n directories: {\n methods: options?.directories?.methods || ['./imports/methods'],\n publications: options?.directories?.publications || ['./imports/publications'],\n },\n shouldTransform: options?.shouldTransform || (({ content }) => content.includes(options?.relayPackageId || 'meteor/zodern:relay')),\n } satisfies Options;\n \n const directories = [\n ...config.directories.methods.map((path) => ['methods', Path.relative(cwd, path)]),\n ...config.directories.publications.map((path) => ['publications', Path.relative(cwd, path)])\n ] as [RelayInfo['type'], string][];\n \n function resolveRelay(id: string): RelayInfo | undefined {\n const relativePath = Path.relative(cwd, id);\n for (const [type, directory] of directories) {\n if (!relativePath.startsWith(directory)) {\n continue;\n }\n return {\n id,\n type,\n relativePath,\n }\n }\n }\n \n return {\n name: 'zodern-relay',\n async load(filename, fileOptions) {\n const relay = resolveRelay(filename || '');\n \n if (!relay) {\n return;\n }\n \n const code = FS.readFileSync(filename, 'utf-8');\n \n // Prevent transforming files that don't use zodern:relay\n if (!config.shouldTransform({ content: code, id: filename })) {\n return;\n }\n \n let arch = 'web.browser.vite';\n \n if (fileOptions?.ssr) {\n arch = 'os.vite.ssr';\n }\n \n const transform = await transformAsync(code, {\n configFile: false,\n babelrc: false,\n filename,\n presets: ['@babel/preset-typescript'], // Add TypeScript preset\n plugins: ['@zodern/babel-plugin-meteor-relay'],\n caller: {\n name: '@meteor-vite/plugin-zodern-relay',\n \n // @ts-expect-error No type definition for this, but it's required by the Babel plugin.\n arch,\n }\n });\n \n if (!transform) {\n return;\n }\n \n let newCode = transform.code ?? '';\n \n // Rewrite any newly added imports to use the correct package ID.\n // Only applicable when using a fork of zodern:relay.\n if (options?.relayPackageId) {\n newCode = newCode.replace('meteor/zodern:relay', options.relayPackageId);\n }\n \n return {\n code: newCode,\n }\n }\n }\n \n \n}\nexport interface Options {\n directories?: {\n /**\n * Path to directories where your zodern:relay methods live\n * @default ['./imports/methods']\n */\n methods?: string[],\n \n /**\n * Path to the directories where your zodern:relay publications live.\n * @default ['./imports/publications']\n */\n publications?: string[],\n }\n /**\n * Specify a custom filter to determine whether a module should be transformed with zodern:relay.\n * Used to prevent unnecessary Babel transformations.\n * @default ({ content }) => content.includes('meteor/zodern:relay')\n * @param id\n */\n shouldTransform?: (file: { content: string, id: string }) => boolean;\n \n /**\n * If you're using a fork of zodern:relay, you should specify its Meteor import string here so imports\n * can be substituted with your fork. The Babel plugin currently injects a hardcoded import string for\n * client-code `zodern:relay/client`, so it's important we correct that before finishing the transform process.\n * @default 'meteor/zodern:relay'\n */\n relayPackageId?: string;\n}\n\ntype RelayInfo = {\n type: 'methods' | 'publications';\n id: string;\n relativePath: string;\n};\n"],"mappings":";AAAA,SAAS,sBAAsB;AAC/B,OAAO,QAAQ;AACf,OAAO,UAAU;AAGjB,IAAM,MAAM,QAAQ,IAAI;AAExB,eAAO,YAAmC,SAAoC;AAC1E,QAAM,SAAS;AAAA,IACX,aAAa;AAAA,MACT,SAAS,SAAS,aAAa,WAAW,CAAC,mBAAmB;AAAA,MAC9D,cAAc,SAAS,aAAa,gBAAgB,CAAC,wBAAwB;AAAA,IACjF;AAAA,IACA,iBAAiB,SAAS,oBAAoB,CAAC,EAAE,QAAQ,MAAM,QAAQ,SAAS,SAAS,kBAAkB,qBAAqB;AAAA,EACpI;AAEA,QAAM,cAAc;AAAA,IAChB,GAAG,OAAO,YAAY,QAAQ,IAAI,CAAC,SAAS,CAAC,WAAW,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC;AAAA,IACjF,GAAG,OAAO,YAAY,aAAa,IAAI,CAAC,SAAS,CAAC,gBAAgB,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC;AAAA,EAC/F;AAEA,WAAS,aAAa,IAAmC;AACrD,UAAM,eAAe,KAAK,SAAS,KAAK,EAAE;AAC1C,eAAW,CAAC,MAAM,SAAS,KAAK,aAAa;AACzC,UAAI,CAAC,aAAa,WAAW,SAAS,GAAG;AACrC;AAAA,MACJ;AACA,aAAO;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AAAA,IACH,MAAM;AAAA,IACN,MAAM,KAAK,UAAU,aAAa;AAC9B,YAAM,QAAQ,aAAa,YAAY,EAAE;AAEzC,UAAI,CAAC,OAAO;AACR;AAAA,MACJ;AAEA,YAAM,OAAO,GAAG,aAAa,UAAU,OAAO;AAG9C,UAAI,CAAC,OAAO,gBAAgB,EAAE,SAAS,MAAM,IAAI,SAAS,CAAC,GAAG;AAC1D;AAAA,MACJ;AAEA,UAAI,OAAO;AAEX,UAAI,aAAa,KAAK;
|
|
1
|
+
{"version":3,"sources":["../src/Plugin.ts"],"sourcesContent":["import { transformAsync } from '@babel/core';\nimport FS from 'fs';\nimport Path from 'path';\nimport { type Plugin } from 'vite';\n\nconst cwd = process.cwd();\n\nexport default async function zodernRelay(options?: Options): Promise<Plugin> {\n const config = {\n directories: {\n methods: options?.directories?.methods || ['./imports/methods'],\n publications: options?.directories?.publications || ['./imports/publications'],\n },\n shouldTransform: options?.shouldTransform || (({ content }) => content.includes(options?.relayPackageId || 'meteor/zodern:relay')),\n } satisfies Options;\n \n const directories = [\n ...config.directories.methods.map((path) => ['methods', Path.relative(cwd, path)]),\n ...config.directories.publications.map((path) => ['publications', Path.relative(cwd, path)])\n ] as [RelayInfo['type'], string][];\n \n function resolveRelay(id: string): RelayInfo | undefined {\n const relativePath = Path.relative(cwd, id);\n for (const [type, directory] of directories) {\n if (!relativePath.startsWith(directory)) {\n continue;\n }\n return {\n id,\n type,\n relativePath,\n }\n }\n }\n \n return {\n name: 'zodern-relay',\n async load(filename, fileOptions) {\n const relay = resolveRelay(filename || '');\n \n if (!relay) {\n return;\n }\n \n const code = FS.readFileSync(filename, 'utf-8');\n \n // Prevent transforming files that don't use zodern:relay\n if (!config.shouldTransform({ content: code, id: filename })) {\n return;\n }\n \n let arch = 'web.browser.vite';\n \n if (fileOptions?.ssr || this.environment.name === 'server') {\n arch = 'os.vite.ssr';\n }\n \n const transform = await transformAsync(code, {\n configFile: false,\n babelrc: false,\n filename,\n presets: ['@babel/preset-typescript'], // Add TypeScript preset\n plugins: ['@zodern/babel-plugin-meteor-relay'],\n caller: {\n name: '@meteor-vite/plugin-zodern-relay',\n \n // @ts-expect-error No type definition for this, but it's required by the Babel plugin.\n arch,\n }\n });\n \n if (!transform) {\n return;\n }\n \n let newCode = transform.code ?? '';\n \n // Rewrite any newly added imports to use the correct package ID.\n // Only applicable when using a fork of zodern:relay.\n if (options?.relayPackageId) {\n newCode = newCode.replace('meteor/zodern:relay', options.relayPackageId);\n }\n \n return {\n code: newCode,\n }\n }\n }\n \n \n}\nexport interface Options {\n directories?: {\n /**\n * Path to directories where your zodern:relay methods live\n * @default ['./imports/methods']\n */\n methods?: string[],\n \n /**\n * Path to the directories where your zodern:relay publications live.\n * @default ['./imports/publications']\n */\n publications?: string[],\n }\n /**\n * Specify a custom filter to determine whether a module should be transformed with zodern:relay.\n * Used to prevent unnecessary Babel transformations.\n * @default ({ content }) => content.includes('meteor/zodern:relay')\n * @param id\n */\n shouldTransform?: (file: { content: string, id: string }) => boolean;\n \n /**\n * If you're using a fork of zodern:relay, you should specify its Meteor import string here so imports\n * can be substituted with your fork. The Babel plugin currently injects a hardcoded import string for\n * client-code `zodern:relay/client`, so it's important we correct that before finishing the transform process.\n * @default 'meteor/zodern:relay'\n */\n relayPackageId?: string;\n}\n\ntype RelayInfo = {\n type: 'methods' | 'publications';\n id: string;\n relativePath: string;\n};\n"],"mappings":";AAAA,SAAS,sBAAsB;AAC/B,OAAO,QAAQ;AACf,OAAO,UAAU;AAGjB,IAAM,MAAM,QAAQ,IAAI;AAExB,eAAO,YAAmC,SAAoC;AAC1E,QAAM,SAAS;AAAA,IACX,aAAa;AAAA,MACT,SAAS,SAAS,aAAa,WAAW,CAAC,mBAAmB;AAAA,MAC9D,cAAc,SAAS,aAAa,gBAAgB,CAAC,wBAAwB;AAAA,IACjF;AAAA,IACA,i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J;AAEA,UAAI,UAAU,UAAU,QAAQ;AAIhC,UAAI,SAAS,gBAAgB;AACzB,kBAAU,QAAQ,QAAQ,uBAAuB,QAAQ,cAAc;AAAA,MAC3E;AAEA,aAAO;AAAA,QACH,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AAGJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meteor-vite/plugin-zodern-relay",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Vite compatability plugin for zodern:relay - typed Meteor methods and publications",
|
|
5
5
|
"main": "dist/Plugin.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
+
"types": "./dist/Plugin.d.ts",
|
|
8
9
|
"require": "./dist/Plugin.js",
|
|
9
|
-
"import": "./dist/Plugin.mjs"
|
|
10
|
-
"types": "./dist/Plugin.d.ts"
|
|
10
|
+
"import": "./dist/Plugin.mjs"
|
|
11
11
|
},
|
|
12
12
|
"./stubs/*": [
|
|
13
13
|
"./stubs/*.js"
|
|
@@ -44,11 +44,9 @@
|
|
|
44
44
|
"@babel/preset-typescript": "^7.24.7",
|
|
45
45
|
"@types/babel__core": "^7.20.5",
|
|
46
46
|
"tsup": "^8.0.2",
|
|
47
|
-
"typescript": "^5.4.2"
|
|
48
|
-
"vite": "^5.1.6"
|
|
47
|
+
"typescript": "^5.4.2"
|
|
49
48
|
},
|
|
50
49
|
"peerDependencies": {
|
|
51
|
-
"@babel/core": "^7.0.0"
|
|
52
|
-
"vite": ">=3.0.0"
|
|
50
|
+
"@babel/core": "^7.0.0"
|
|
53
51
|
}
|
|
54
52
|
}
|
package/src/Plugin.ts
CHANGED