houdini 1.0.0-next.0 → 1.0.0-next.1
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/build/cmd-cjs/index.js +13 -44
- package/build/cmd-esm/index.js +13 -44
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -77497,7 +77497,7 @@ async function init(_path, args) {
|
|
|
77497
77497
|
} else if (framework === "svelte") {
|
|
77498
77498
|
await updateSvelteMainJs(targetPath);
|
|
77499
77499
|
}
|
|
77500
|
-
await updateViteConfig(targetPath, framework
|
|
77500
|
+
await updateViteConfig(targetPath, framework);
|
|
77501
77501
|
await tjsConfig(targetPath, framework);
|
|
77502
77502
|
console.log();
|
|
77503
77503
|
console.log("\u{1F3A9} Welcome to Houdini!");
|
|
@@ -77611,8 +77611,8 @@ async function tjsConfig(targetPath, framework) {
|
|
|
77611
77611
|
}
|
|
77612
77612
|
return false;
|
|
77613
77613
|
}
|
|
77614
|
-
async function updateViteConfig(targetPath, framework
|
|
77615
|
-
const viteConfigPath = path_exports.join(targetPath,
|
|
77614
|
+
async function updateViteConfig(targetPath, framework) {
|
|
77615
|
+
const viteConfigPath = path_exports.join(targetPath, "vite.config.js");
|
|
77616
77616
|
const viteConfigKit = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
77617
77617
|
import houdini from 'houdini/vite';
|
|
77618
77618
|
|
|
@@ -77621,16 +77621,6 @@ const config = {
|
|
|
77621
77621
|
plugins: [houdini(), sveltekit()],
|
|
77622
77622
|
}
|
|
77623
77623
|
|
|
77624
|
-
export default config;
|
|
77625
|
-
`;
|
|
77626
|
-
const viteConfigKitTs = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
77627
|
-
import houdini from 'houdini/vite';
|
|
77628
|
-
import type { UserConfig } from "vite";
|
|
77629
|
-
|
|
77630
|
-
const config: UserConfig = {
|
|
77631
|
-
plugins: [houdini(), sveltekit()],
|
|
77632
|
-
}
|
|
77633
|
-
|
|
77634
77624
|
export default config;
|
|
77635
77625
|
`;
|
|
77636
77626
|
const viteConfigSvelte = `import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
@@ -77643,39 +77633,18 @@ const config = {
|
|
|
77643
77633
|
|
|
77644
77634
|
export default config;
|
|
77645
77635
|
`;
|
|
77646
|
-
|
|
77647
|
-
|
|
77648
|
-
import type { UserConfig } from "vite";
|
|
77649
|
-
|
|
77650
|
-
const config: UserConfig = {
|
|
77651
|
-
plugins: [houdini(), svelte()],
|
|
77652
|
-
}
|
|
77653
|
-
|
|
77654
|
-
export default config;
|
|
77655
|
-
`;
|
|
77656
|
-
let content = "NOTHING!";
|
|
77657
|
-
if (framework === "kit" && typescript) {
|
|
77658
|
-
content = viteConfigKitTs;
|
|
77659
|
-
} else if (framework === "kit" && !typescript) {
|
|
77636
|
+
let content;
|
|
77637
|
+
if (framework === "kit") {
|
|
77660
77638
|
content = viteConfigKit;
|
|
77661
|
-
} else if (framework === "svelte"
|
|
77662
|
-
content = viteConfigSvelteTs;
|
|
77663
|
-
} else if (framework === "svelte" && !typescript) {
|
|
77639
|
+
} else if (framework === "svelte") {
|
|
77664
77640
|
content = viteConfigSvelte;
|
|
77665
77641
|
} else {
|
|
77666
77642
|
throw new Error("Unknown updateViteConfig()");
|
|
77667
77643
|
}
|
|
77668
|
-
|
|
77669
|
-
|
|
77670
|
-
|
|
77671
|
-
|
|
77672
|
-
});
|
|
77673
|
-
} else {
|
|
77674
|
-
await updateFile({
|
|
77675
|
-
filepath: viteConfigPath,
|
|
77676
|
-
content: framework === "kit" ? viteConfigKit : viteConfigSvelte
|
|
77677
|
-
});
|
|
77678
|
-
}
|
|
77644
|
+
await updateFile({
|
|
77645
|
+
filepath: viteConfigPath,
|
|
77646
|
+
content: framework === "kit" ? viteConfigKit : viteConfigSvelte
|
|
77647
|
+
});
|
|
77679
77648
|
}
|
|
77680
77649
|
async function updateSvelteConfig(targetPath, typescript) {
|
|
77681
77650
|
const svelteConfigPath = path_exports.join(targetPath, "svelte.config.js");
|
|
@@ -77696,7 +77665,7 @@ const config = {
|
|
|
77696
77665
|
}
|
|
77697
77666
|
};
|
|
77698
77667
|
|
|
77699
|
-
export default config;
|
|
77668
|
+
export default config;
|
|
77700
77669
|
`;
|
|
77701
77670
|
const newContentJs = `import adapter from '@sveltejs/adapter-auto';
|
|
77702
77671
|
|
|
@@ -77746,8 +77715,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
77746
77715
|
}
|
|
77747
77716
|
packageJSON.devDependencies = {
|
|
77748
77717
|
...packageJSON.devDependencies,
|
|
77749
|
-
houdini: "^1.0.0-next.
|
|
77750
|
-
"houdini-svelte": "^1.0.0-next.
|
|
77718
|
+
houdini: "^1.0.0-next.1",
|
|
77719
|
+
"houdini-svelte": "^1.0.0-next.1",
|
|
77751
77720
|
graphql: "^15.8.0"
|
|
77752
77721
|
};
|
|
77753
77722
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -77502,7 +77502,7 @@ async function init(_path, args) {
|
|
|
77502
77502
|
} else if (framework === "svelte") {
|
|
77503
77503
|
await updateSvelteMainJs(targetPath);
|
|
77504
77504
|
}
|
|
77505
|
-
await updateViteConfig(targetPath, framework
|
|
77505
|
+
await updateViteConfig(targetPath, framework);
|
|
77506
77506
|
await tjsConfig(targetPath, framework);
|
|
77507
77507
|
console.log();
|
|
77508
77508
|
console.log("\u{1F3A9} Welcome to Houdini!");
|
|
@@ -77616,8 +77616,8 @@ async function tjsConfig(targetPath, framework) {
|
|
|
77616
77616
|
}
|
|
77617
77617
|
return false;
|
|
77618
77618
|
}
|
|
77619
|
-
async function updateViteConfig(targetPath, framework
|
|
77620
|
-
const viteConfigPath = path_exports.join(targetPath,
|
|
77619
|
+
async function updateViteConfig(targetPath, framework) {
|
|
77620
|
+
const viteConfigPath = path_exports.join(targetPath, "vite.config.js");
|
|
77621
77621
|
const viteConfigKit = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
77622
77622
|
import houdini from 'houdini/vite';
|
|
77623
77623
|
|
|
@@ -77626,16 +77626,6 @@ const config = {
|
|
|
77626
77626
|
plugins: [houdini(), sveltekit()],
|
|
77627
77627
|
}
|
|
77628
77628
|
|
|
77629
|
-
export default config;
|
|
77630
|
-
`;
|
|
77631
|
-
const viteConfigKitTs = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
77632
|
-
import houdini from 'houdini/vite';
|
|
77633
|
-
import type { UserConfig } from "vite";
|
|
77634
|
-
|
|
77635
|
-
const config: UserConfig = {
|
|
77636
|
-
plugins: [houdini(), sveltekit()],
|
|
77637
|
-
}
|
|
77638
|
-
|
|
77639
77629
|
export default config;
|
|
77640
77630
|
`;
|
|
77641
77631
|
const viteConfigSvelte = `import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
@@ -77648,39 +77638,18 @@ const config = {
|
|
|
77648
77638
|
|
|
77649
77639
|
export default config;
|
|
77650
77640
|
`;
|
|
77651
|
-
|
|
77652
|
-
|
|
77653
|
-
import type { UserConfig } from "vite";
|
|
77654
|
-
|
|
77655
|
-
const config: UserConfig = {
|
|
77656
|
-
plugins: [houdini(), svelte()],
|
|
77657
|
-
}
|
|
77658
|
-
|
|
77659
|
-
export default config;
|
|
77660
|
-
`;
|
|
77661
|
-
let content = "NOTHING!";
|
|
77662
|
-
if (framework === "kit" && typescript) {
|
|
77663
|
-
content = viteConfigKitTs;
|
|
77664
|
-
} else if (framework === "kit" && !typescript) {
|
|
77641
|
+
let content;
|
|
77642
|
+
if (framework === "kit") {
|
|
77665
77643
|
content = viteConfigKit;
|
|
77666
|
-
} else if (framework === "svelte"
|
|
77667
|
-
content = viteConfigSvelteTs;
|
|
77668
|
-
} else if (framework === "svelte" && !typescript) {
|
|
77644
|
+
} else if (framework === "svelte") {
|
|
77669
77645
|
content = viteConfigSvelte;
|
|
77670
77646
|
} else {
|
|
77671
77647
|
throw new Error("Unknown updateViteConfig()");
|
|
77672
77648
|
}
|
|
77673
|
-
|
|
77674
|
-
|
|
77675
|
-
|
|
77676
|
-
|
|
77677
|
-
});
|
|
77678
|
-
} else {
|
|
77679
|
-
await updateFile({
|
|
77680
|
-
filepath: viteConfigPath,
|
|
77681
|
-
content: framework === "kit" ? viteConfigKit : viteConfigSvelte
|
|
77682
|
-
});
|
|
77683
|
-
}
|
|
77649
|
+
await updateFile({
|
|
77650
|
+
filepath: viteConfigPath,
|
|
77651
|
+
content: framework === "kit" ? viteConfigKit : viteConfigSvelte
|
|
77652
|
+
});
|
|
77684
77653
|
}
|
|
77685
77654
|
async function updateSvelteConfig(targetPath, typescript) {
|
|
77686
77655
|
const svelteConfigPath = path_exports.join(targetPath, "svelte.config.js");
|
|
@@ -77701,7 +77670,7 @@ const config = {
|
|
|
77701
77670
|
}
|
|
77702
77671
|
};
|
|
77703
77672
|
|
|
77704
|
-
export default config;
|
|
77673
|
+
export default config;
|
|
77705
77674
|
`;
|
|
77706
77675
|
const newContentJs = `import adapter from '@sveltejs/adapter-auto';
|
|
77707
77676
|
|
|
@@ -77751,8 +77720,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
77751
77720
|
}
|
|
77752
77721
|
packageJSON.devDependencies = {
|
|
77753
77722
|
...packageJSON.devDependencies,
|
|
77754
|
-
houdini: "^1.0.0-next.
|
|
77755
|
-
"houdini-svelte": "^1.0.0-next.
|
|
77723
|
+
houdini: "^1.0.0-next.1",
|
|
77724
|
+
"houdini-svelte": "^1.0.0-next.1",
|
|
77756
77725
|
graphql: "^15.8.0"
|
|
77757
77726
|
};
|
|
77758
77727
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|