astro-tractstack 2.0.0-rc.18 → 2.0.0-rc.19
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/bin/create-tractstack.js +3 -2
- package/dist/index.js +6 -2
- package/package.json +1 -1
- package/templates/custom/minimal/CodeHook.astro +3 -2
- package/templates/custom/with-examples/CodeHook.astro +3 -2
- package/templates/gitignore +42 -0
- package/templates/prettierignore +5 -0
- package/templates/prettierrc +19 -0
- package/templates/src/lib/storyData.ts +2 -2
- package/utils/inject-files.ts +6 -2
package/bin/create-tractstack.js
CHANGED
|
@@ -258,8 +258,9 @@ ${kleur.bold('Examples:')}
|
|
|
258
258
|
const finalResponses = {
|
|
259
259
|
goBackend: responses.goBackend || envDefaults.goBackend,
|
|
260
260
|
enableMultiTenant:
|
|
261
|
-
responses.enableMultiTenant
|
|
262
|
-
|
|
261
|
+
responses.enableMultiTenant === true || // explicit true from prompt
|
|
262
|
+
enableMultiTenant || // CLI flag --multi-tenant
|
|
263
|
+
envDefaults.enableMultiTenant === true, // existing .env value was "true"
|
|
263
264
|
tenantId: responses.tenantId || envDefaults.tenantId,
|
|
264
265
|
goBackendPath: responses.goBackendPath || envDefaults.goBackendPath,
|
|
265
266
|
includeExamples: responses.includeExamples ?? includeExamples,
|
package/dist/index.js
CHANGED
|
@@ -30,11 +30,15 @@ async function w(t, e, c) {
|
|
|
30
30
|
dest: "env.example"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
src: t("
|
|
33
|
+
src: t("../templates/prettierrc"),
|
|
34
|
+
dest: ".prettierrc"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
src: t("../templates/prettierignore"),
|
|
34
38
|
dest: ".prettierignore"
|
|
35
39
|
},
|
|
36
40
|
{
|
|
37
|
-
src: t("../templates
|
|
41
|
+
src: t("../templates/gitignore"),
|
|
38
42
|
dest: ".gitignore"
|
|
39
43
|
},
|
|
40
44
|
{
|
package/package.json
CHANGED
|
@@ -4,12 +4,13 @@ import ListContent from '@/components/codehooks/ListContent.astro';
|
|
|
4
4
|
import BunnyVideoWrapper from '@/components/codehooks/BunnyVideoWrapper.astro';
|
|
5
5
|
import EpinetWrapper from '@/components/codehooks/EpinetWrapper';
|
|
6
6
|
import type { FullContentMapItem } from '@/types/tractstack';
|
|
7
|
+
import type { ResourceNode } from '@/types/compositorTypes';
|
|
7
8
|
// import CustomHero from './CustomHero.astro'; // Uncomment to add custom components
|
|
8
9
|
|
|
9
10
|
export interface Props {
|
|
10
11
|
target: string;
|
|
11
12
|
fullContentMap: FullContentMapItem[];
|
|
12
|
-
resourcesPayload?: Record<string,
|
|
13
|
+
resourcesPayload?: Record<string, ResourceNode[]>;
|
|
13
14
|
options?: {
|
|
14
15
|
params?: {
|
|
15
16
|
options?: string;
|
|
@@ -17,7 +18,7 @@ export interface Props {
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
const { target, options, fullContentMap
|
|
21
|
+
const { target, options, fullContentMap /*, resourcesPayload */ } = Astro.props;
|
|
21
22
|
|
|
22
23
|
export const components = {
|
|
23
24
|
'featured-content': true,
|
|
@@ -5,11 +5,12 @@ import ListContent from '@/components/codehooks/ListContent.astro';
|
|
|
5
5
|
import BunnyVideoWrapper from '@/components/codehooks/BunnyVideoWrapper.astro';
|
|
6
6
|
import EpinetWrapper from '@/components/codehooks/EpinetWrapper';
|
|
7
7
|
import type { FullContentMapItem } from '@/types/tractstack';
|
|
8
|
+
import type { ResourceNode } from '@/types/compositorTypes';
|
|
8
9
|
|
|
9
10
|
export interface Props {
|
|
10
11
|
target: string;
|
|
11
12
|
fullContentMap: FullContentMapItem[];
|
|
12
|
-
resourcesPayload?: Record<string,
|
|
13
|
+
resourcesPayload?: Record<string, ResourceNode[]>;
|
|
13
14
|
options?: {
|
|
14
15
|
params?: {
|
|
15
16
|
options?: string;
|
|
@@ -17,7 +18,7 @@ export interface Props {
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
const { target, options, fullContentMap
|
|
21
|
+
const { target, options, fullContentMap /*, resourcesPayload */ } = Astro.props;
|
|
21
22
|
|
|
22
23
|
export const components = {
|
|
23
24
|
'custom-hero': true,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Build output
|
|
2
|
+
dist/
|
|
3
|
+
*.tgz
|
|
4
|
+
#*.d.ts
|
|
5
|
+
|
|
6
|
+
# Dependencies
|
|
7
|
+
node_modules/
|
|
8
|
+
|
|
9
|
+
# Environment
|
|
10
|
+
.env
|
|
11
|
+
.env.local
|
|
12
|
+
.env.*.local
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.vscode/
|
|
16
|
+
.idea/
|
|
17
|
+
*.swp
|
|
18
|
+
*.swo
|
|
19
|
+
|
|
20
|
+
# OS
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|
|
23
|
+
|
|
24
|
+
# Logs
|
|
25
|
+
*.log
|
|
26
|
+
npm-debug.log*
|
|
27
|
+
yarn-debug.log*
|
|
28
|
+
yarn-error.log*
|
|
29
|
+
pnpm-debug.log*
|
|
30
|
+
|
|
31
|
+
# Runtime data
|
|
32
|
+
pids
|
|
33
|
+
*.pid
|
|
34
|
+
*.seed
|
|
35
|
+
*.pid.lock
|
|
36
|
+
|
|
37
|
+
# Coverage directory used by tools like istanbul
|
|
38
|
+
coverage/
|
|
39
|
+
|
|
40
|
+
# Temporary folders
|
|
41
|
+
tmp/
|
|
42
|
+
temp/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"semi": true,
|
|
3
|
+
"singleQuote": true,
|
|
4
|
+
"tabWidth": 2,
|
|
5
|
+
"trailingComma": "es5",
|
|
6
|
+
"printWidth": 80,
|
|
7
|
+
"plugins": [
|
|
8
|
+
"prettier-plugin-astro",
|
|
9
|
+
"prettier-plugin-tailwindcss"
|
|
10
|
+
],
|
|
11
|
+
"overrides": [
|
|
12
|
+
{
|
|
13
|
+
"files": "*.astro",
|
|
14
|
+
"options": {
|
|
15
|
+
"parser": "astro"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { handleFailedResponse } from '@/utils/backend';
|
|
2
|
-
import type { ImpressionNode } from '@/types/compositorTypes';
|
|
2
|
+
import type { ImpressionNode, ResourceNode } from '@/types/compositorTypes';
|
|
3
3
|
|
|
4
4
|
export interface StoryData {
|
|
5
5
|
id: string;
|
|
@@ -7,7 +7,7 @@ export interface StoryData {
|
|
|
7
7
|
slug: string;
|
|
8
8
|
paneIds: string[];
|
|
9
9
|
codeHookTargets: Record<string, string>;
|
|
10
|
-
resourcesPayload: Record<string,
|
|
10
|
+
resourcesPayload: Record<string, ResourceNode[]>;
|
|
11
11
|
impressions: ImpressionNode[];
|
|
12
12
|
fragments: Record<string, string>;
|
|
13
13
|
menu: any;
|
package/utils/inject-files.ts
CHANGED
|
@@ -29,11 +29,15 @@ export async function injectTemplateFiles(
|
|
|
29
29
|
dest: 'env.example',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
src: resolve('
|
|
32
|
+
src: resolve('../templates/prettierrc'),
|
|
33
|
+
dest: '.prettierrc',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
src: resolve('../templates/prettierignore'),
|
|
33
37
|
dest: '.prettierignore',
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
|
-
src: resolve('../templates
|
|
40
|
+
src: resolve('../templates/gitignore'),
|
|
37
41
|
dest: '.gitignore',
|
|
38
42
|
},
|
|
39
43
|
{
|