astro-tractstack 2.0.0-rc.17 → 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.
@@ -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
- (enableMultiTenant || envDefaults.enableMultiTenant),
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,7 +30,15 @@ async function w(t, e, c) {
30
30
  dest: "env.example"
31
31
  },
32
32
  {
33
- src: t("../templates/.gitignore"),
33
+ src: t("../templates/prettierrc"),
34
+ dest: ".prettierrc"
35
+ },
36
+ {
37
+ src: t("../templates/prettierignore"),
38
+ dest: ".prettierignore"
39
+ },
40
+ {
41
+ src: t("../templates/gitignore"),
34
42
  dest: ".gitignore"
35
43
  },
36
44
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-tractstack",
3
- "version": "2.0.0-rc.17",
3
+ "version": "2.0.0-rc.19",
4
4
  "description": "Astro integration for TractStack - redeeming the web from boring experiences",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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, any[]>;
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 /* resourcesPayload */ } = Astro.props;
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, any[]>;
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 /* resourcesPayload */ } = Astro.props;
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,5 @@
1
+ node_modules/
2
+ dist/
3
+ .astro/
4
+ templates/css/
5
+ templates/fonts/
@@ -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, any[]>;
10
+ resourcesPayload: Record<string, ResourceNode[]>;
11
11
  impressions: ImpressionNode[];
12
12
  fragments: Record<string, string>;
13
13
  menu: any;
@@ -209,7 +209,7 @@ for (const [key, value] of Astro.url.searchParams) {
209
209
  <div class="pointer-events-auto">
210
210
  <SettingsPanel
211
211
  config={brandConfig}
212
- availableCodeHooks={['featured-content', 'list-content', 'bunny-video']}
212
+ availableCodeHooks={Object.keys(codeHookComponents)}
213
213
  client:only="react"
214
214
  />
215
215
  </div>
@@ -200,7 +200,7 @@ for (const [key, value] of Astro.url.searchParams) {
200
200
  <div class="pointer-events-auto">
201
201
  <SettingsPanel
202
202
  config={brandConfig}
203
- availableCodeHooks={['featured-content', 'list-content', 'bunny-video']}
203
+ availableCodeHooks={Object.keys(codeHookComponents)}
204
204
  client:only="react"
205
205
  />
206
206
  </div>
@@ -29,7 +29,15 @@ export async function injectTemplateFiles(
29
29
  dest: 'env.example',
30
30
  },
31
31
  {
32
- src: resolve('../templates/.gitignore'),
32
+ src: resolve('../templates/prettierrc'),
33
+ dest: '.prettierrc',
34
+ },
35
+ {
36
+ src: resolve('../templates/prettierignore'),
37
+ dest: '.prettierignore',
38
+ },
39
+ {
40
+ src: resolve('../templates/gitignore'),
33
41
  dest: '.gitignore',
34
42
  },
35
43
  {