@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-twenty-app",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"description": "Command-line interface to create Twenty application",
|
||||
"main": "dist/cli.cjs",
|
||||
"bin": "dist/cli.cjs",
|
||||
|
||||
@@ -70,7 +70,7 @@ describe('copyBaseApplicationProject', () => {
|
||||
const packageJson = await fs.readJson(packageJsonPath);
|
||||
expect(packageJson.name).toBe('my-test-app');
|
||||
expect(packageJson.version).toBe('0.1.0');
|
||||
expect(packageJson.dependencies['twenty-sdk']).toBe('0.5.1');
|
||||
expect(packageJson.dependencies['twenty-sdk']).toBe('0.5.2');
|
||||
expect(packageJson.scripts['app:dev']).toBe('twenty app:dev');
|
||||
});
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ const createPackageJson = async ({
|
||||
'lint:fix': 'eslint --fix',
|
||||
},
|
||||
dependencies: {
|
||||
'twenty-sdk': '0.5.1',
|
||||
'twenty-sdk': '0.5.2',
|
||||
},
|
||||
devDependencies: {
|
||||
typescript: '^5.9.3',
|
||||
|
||||
@@ -4,6 +4,7 @@ import { defineConfig } from 'vite';
|
||||
import dts from 'vite-plugin-dts';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import packageJson from './package.json';
|
||||
import type { PackageJson } from 'type-fest';
|
||||
|
||||
const moduleEntries = Object.keys((packageJson as any).exports || {})
|
||||
.filter(
|
||||
@@ -70,13 +71,25 @@ export default defineConfig(() => {
|
||||
outDir: 'dist',
|
||||
lib: { entry: entries, name: 'create-twenty-app' },
|
||||
rollupOptions: {
|
||||
external: [
|
||||
...Object.keys((packageJson as any).dependencies || {}),
|
||||
'path',
|
||||
'fs',
|
||||
'child_process',
|
||||
'util',
|
||||
],
|
||||
external: (id: string) => {
|
||||
if (/^node:/.test(id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const builtins = ['path', 'fs', 'child_process', 'util'];
|
||||
|
||||
if (builtins.includes(id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const deps = Object.entries(
|
||||
(packageJson as PackageJson).dependencies || {},
|
||||
).filter(([_, version]) => !version?.startsWith('workspace:'));
|
||||
|
||||
return deps.some(
|
||||
([dep, _]) => id === dep || id.startsWith(dep + '/'),
|
||||
);
|
||||
},
|
||||
output: [
|
||||
{
|
||||
format: 'es',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-sdk",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"main": "dist/index.cjs",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -3,6 +3,7 @@ import { defineConfig } from 'vite';
|
||||
import dts from 'vite-plugin-dts';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import packageJson from './package.json';
|
||||
import { type PackageJson } from 'type-fest';
|
||||
|
||||
const entries = [
|
||||
'src/index.ts',
|
||||
@@ -78,7 +79,9 @@ export default defineConfig(() => {
|
||||
warn(warning);
|
||||
},
|
||||
external: (id: string) => {
|
||||
if (/^node:/.test(id)) return true;
|
||||
if (/^node:/.test(id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const builtins = [
|
||||
'path',
|
||||
@@ -91,11 +94,18 @@ export default defineConfig(() => {
|
||||
'os',
|
||||
'module',
|
||||
];
|
||||
if (builtins.includes(id)) return true;
|
||||
|
||||
const deps = Object.keys((packageJson as any).dependencies || {});
|
||||
if (builtins.includes(id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return deps.some((dep) => id === dep || id.startsWith(dep + '/'));
|
||||
const deps = Object.entries(
|
||||
(packageJson as PackageJson).dependencies || {},
|
||||
).filter(([_, version]) => !version?.startsWith('workspace:'));
|
||||
|
||||
return deps.some(
|
||||
([dep, _]) => id === dep || id.startsWith(dep + '/'),
|
||||
);
|
||||
},
|
||||
output: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user