vite-plugin-ferry 0.1.0 → 0.1.2
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.d.ts.map +1 -1
- package/dist/index.js +5 -11
- package/dist/utils/banner.d.ts +0 -7
- package/dist/utils/banner.d.ts.map +1 -1
- package/dist/utils/banner.js +0 -13
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAMnC,MAAM,MAAM,0BAA0B,GAAG;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAC3B,OAAO,GAAE,0BAER,GACA,MAAM,CAmFR"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { generateEnums } from './generators/enums.js';
|
|
3
3
|
import { generateResources } from './generators/resources.js';
|
|
4
|
-
import { displayBanner } from './utils/banner.js';
|
|
5
4
|
import { setupEnumWatcher } from './watchers/enums.js';
|
|
6
5
|
import { setupResourceWatcher } from './watchers/resources.js';
|
|
7
6
|
/**
|
|
@@ -54,7 +53,11 @@ export default function ferry(options = {
|
|
|
54
53
|
catch (e) {
|
|
55
54
|
console.error(`[${name}] Error generating types during config():`, e);
|
|
56
55
|
}
|
|
57
|
-
return
|
|
56
|
+
return {
|
|
57
|
+
optimizeDeps: {
|
|
58
|
+
exclude: [`${namespace}/enums`, `${namespace}/resources`],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
58
61
|
},
|
|
59
62
|
// Run generation when build starts
|
|
60
63
|
buildStart() {
|
|
@@ -67,15 +70,6 @@ export default function ferry(options = {
|
|
|
67
70
|
},
|
|
68
71
|
// Set up watchers for dev server
|
|
69
72
|
configureServer(server) {
|
|
70
|
-
// Display startup banner
|
|
71
|
-
server.httpServer?.once('listening', () => {
|
|
72
|
-
setTimeout(() => {
|
|
73
|
-
displayBanner({
|
|
74
|
-
packages: [`${namespace}/enums`, `${namespace}/resources`],
|
|
75
|
-
version: '1.0.0',
|
|
76
|
-
});
|
|
77
|
-
}, 200);
|
|
78
|
-
});
|
|
79
73
|
// Set up enum watcher
|
|
80
74
|
setupEnumWatcher({
|
|
81
75
|
enumsDir,
|
package/dist/utils/banner.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/utils/banner.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/utils/banner.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAIzD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAMhF"}
|
package/dist/utils/banner.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import pc from 'picocolors';
|
|
2
|
-
/**
|
|
3
|
-
* Display a startup banner for the plugin.
|
|
4
|
-
*/
|
|
5
|
-
export function displayBanner(options) {
|
|
6
|
-
const { packages, version = '1.0.0' } = options;
|
|
7
|
-
console.log('');
|
|
8
|
-
console.log(pc.cyan(' PRIMCLOUD') + pc.dim(` resource-types ${pc.bold(`v${version}`)}`));
|
|
9
|
-
console.log('');
|
|
10
|
-
for (const pkg of packages) {
|
|
11
|
-
console.log(pc.green(' ➜') + ' ' + pc.bold(pkg));
|
|
12
|
-
}
|
|
13
|
-
console.log('');
|
|
14
|
-
}
|
|
15
2
|
/**
|
|
16
3
|
* Log a file change event.
|
|
17
4
|
*/
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"prettier": "@aniftyco/prettier",
|
|
4
4
|
"description": "Ferries Laravel types to your TypeScript frontend",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.2",
|
|
7
7
|
"repository": "https://github.com/aniftyco/vite-plugin-ferry",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|