polen 0.0.6 → 0.0.7-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.
@@ -1,3 +1,3 @@
1
1
  import { Configurator } from './configurator/_namespace.js';
2
2
  import { Vite } from '../lib/vite/_namespace.js';
3
- export declare const VitePlugin: (polenConfigInput?: Configurator.ConfigInput) => Vite.PluginOption[];
3
+ export declare const VitePlugin: (polenConfigInput?: Configurator.ConfigInput) => Vite.PluginOption;
@@ -2,12 +2,12 @@ import { Configurator } from './configurator/_namespace.js';
2
2
  import { Vite } from '../lib/vite/_namespace.js';
3
3
  import ReactVite from '@vitejs/plugin-react';
4
4
  import { Fs } from '../lib/fs/_namespace.js';
5
- import { virtualIdentifier } from './helpers.js';
5
+ import { vi } from './helpers.js';
6
6
  import { Build } from './build.js';
7
7
  import { nodeAdapter as HonoDevServerNodeAdapter } from '@hono/vite-dev-server/node';
8
8
  import HonoDevServer from '@hono/vite-dev-server';
9
- const virtualIdentifierAssetGraphqlSchema = virtualIdentifier([`assets`, `graphql-schema`]);
10
- const virtualIdentifierTemplateVariables = virtualIdentifier([`template`, `variables`]);
9
+ const viAssetGraphqlSchema = vi([`assets`, `graphql-schema`]);
10
+ const viTemplateVariables = vi([`template`, `variables`]);
11
11
  const codes = {
12
12
  MODULE_LEVEL_DIRECTIVE: `MODULE_LEVEL_DIRECTIVE`,
13
13
  CIRCULAR_DEPENDENCY: `CIRCULAR_DEPENDENCY`,
@@ -24,13 +24,13 @@ export const VitePlugin = (polenConfigInput) => {
24
24
  {
25
25
  name: `polen-virtual`,
26
26
  ...Vite.VirtualIdentifier.toHooks$FromMap(new Map([
27
- [virtualIdentifierAssetGraphqlSchema, async () => {
27
+ [viAssetGraphqlSchema, async () => {
28
28
  const schema = await Fs.readFile(polenConfig.schema.path, `utf-8`);
29
29
  const moduleContent = `export default ${JSON.stringify(schema)}`;
30
30
  return moduleContent;
31
31
  }],
32
32
  // eslint-disable-next-line
33
- [virtualIdentifierTemplateVariables, async () => {
33
+ [viTemplateVariables, async () => {
34
34
  const moduleContent = `export default ${JSON.stringify(polenConfig.templateVariables)}`;
35
35
  return moduleContent;
36
36
  }],
@@ -2,9 +2,9 @@ import { CodeBuilder } from '../lib/code-builder/_namespace.js';
2
2
  import { Fs } from '../lib/fs/_namespace.js';
3
3
  import { Path } from '../lib/path/_namespace.js';
4
4
  import { Vite } from '../lib/vite/_namespace.js';
5
- import { virtualIdentifier } from './helpers.js';
5
+ import { vi } from './helpers.js';
6
6
  import { defu } from 'defu';
7
- const viServerEntry = virtualIdentifier([`server`, `entry`]);
7
+ const viServerEntry = vi([`server`, `entry`]);
8
8
  export const Build = (parameters) => {
9
9
  const config = defu(parameters, { debug: false });
10
10
  let viteConfigResolved;
@@ -117,7 +117,7 @@ export const Build = (parameters) => {
117
117
  },
118
118
  }];
119
119
  };
120
- const viClientManifest = virtualIdentifier([`vite`, `client`, `manifest`]);
120
+ const viClientManifest = vi([`vite`, `client`, `manifest`]);
121
121
  const Manifest = () => {
122
122
  let configEnv;
123
123
  let viteConfigResolved;
@@ -1,2 +1,2 @@
1
1
  import { Vite } from '../lib/vite/_namespace.js';
2
- export declare const virtualIdentifier: (idOrIdSegments: string | string[]) => Vite.VirtualIdentifier.VirtualIdentifier;
2
+ export declare const vi: (idOrIdSegments: string | string[]) => Vite.VirtualIdentifier.VirtualIdentifier;
@@ -1,2 +1,2 @@
1
1
  import { Vite } from '../lib/vite/_namespace.js';
2
- export const virtualIdentifier = Vite.VirtualIdentifier.createNamespaceFactory(`polen`);
2
+ export const vi = Vite.VirtualIdentifier.createNamespaceFactory(`polen`);
package/package.json CHANGED
@@ -1,7 +1,24 @@
1
1
  {
2
2
  "name": "polen",
3
- "version": "0.0.6",
3
+ "version": "0.0.7-next.1",
4
4
  "type": "module",
5
+ "scripts": {
6
+ "dev": "pnpm build:watch:emit",
7
+ "build": "tsc",
8
+ "build:watch": "tsc --watch",
9
+ "build:watch:emit": "tsc --watch --nocheck",
10
+ "build:emit": "tsc --noCheck",
11
+ "fix": "pnpm fix:lint && pnpm fix:format",
12
+ "fix:lint": "eslint . --fix",
13
+ "fix:format": "dprint fmt",
14
+ "check": "pnpm check:format && pnpm check:lint && pnpm check:types && pnpm check:publint",
15
+ "check:format": "dprint check",
16
+ "check:lint": "eslint . --max-warnings 0",
17
+ "check:types": "tsc --noEmit",
18
+ "check:publint": "publint run --strict",
19
+ "release:version": "changeset version && git commit -am \"chore: release\" && git push",
20
+ "prepublishOnly": "pnpm build"
21
+ },
5
22
  "repository": {
6
23
  "type": "git",
7
24
  "url": "https://github.com/the-guild-org/polen.git"
@@ -58,22 +75,8 @@
58
75
  "vite-tsconfig-paths": "^5.1.4",
59
76
  "vitest": "^3.1.1"
60
77
  },
78
+ "packageManager": "pnpm@10.8.0",
61
79
  "peerDependencies": {
62
80
  "vite": "^6.2.5"
63
- },
64
- "scripts": {
65
- "build": "tsc",
66
- "build:watch": "tsc --watch",
67
- "build:watch:emit": "tsc --watch --nocheck",
68
- "build:emit": "tsc --noCheck",
69
- "fix": "pnpm fix:lint && pnpm fix:format",
70
- "fix:lint": "eslint . --fix",
71
- "fix:format": "dprint fmt",
72
- "check": "pnpm check:format && pnpm check:lint && pnpm check:types && pnpm check:publint",
73
- "check:format": "dprint check",
74
- "check:lint": "eslint . --max-warnings 0",
75
- "check:types": "tsc --noEmit",
76
- "check:publint": "publint run --strict",
77
- "release:version": "changeset version && git commit -am \"chore: release\" && git push"
78
81
  }
79
82
  }
@@ -1,6 +0,0 @@
1
- import type { FC } from 'react';
2
- import type { GraphQLSchema } from 'graphql';
3
- export interface Props {
4
- schema: GraphQLSchema;
5
- }
6
- export declare const TypeIndex: FC<Props>;
@@ -1,26 +0,0 @@
1
- import { Box, Flex, Heading } from '@radix-ui/themes';
2
- import { Grafaid } from '../../lib/grafaid/index.js';
3
- import { Link } from './Link.jsx';
4
- import { entries } from '../../lib/prelude/main.js';
5
- export const TypeIndex = ({ schema }) => {
6
- const kindMap = Grafaid.getKindMap(schema);
7
- const sections = entries(kindMap.list);
8
- return (<Flex direction="column" gap="6">
9
- {sections.map(([title, types]) => <TypeSection key={title} title={title} types={types}/>)}
10
- </Flex>);
11
- };
12
- const TypeSection = ({ title, types }) => {
13
- return (<Box>
14
- <Heading size="3">{title}</Heading>
15
- <TypeList types={types}/>
16
- </Box>);
17
- };
18
- const TypeList = ({ types }) => {
19
- return ((<Box>
20
- {types.map(type => (<Box key={type.name}>
21
- <Link to={`/reference/${type.name}`}>
22
- {type.name}
23
- </Link>
24
- </Box>))}
25
- </Box>));
26
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const index: import("react-router").IndexRouteObject;
@@ -1,23 +0,0 @@
1
- import { Link, Outlet } from 'react-router';
2
- import { createRouteIndex } from '../../lib/react-router-helpers.js';
3
- import { Box } from '@radix-ui/themes';
4
- import { reference } from './reference.jsx';
5
- const Component = () => {
6
- return (<Box>
7
- <Box>
8
- <Box>
9
- <Link to="/reference">Home</Link>
10
- <Link to="/reference">Reference</Link>
11
- </Box>
12
- </Box>
13
- <Box>
14
- <Outlet />
15
- </Box>
16
- </Box>);
17
- };
18
- export const index = createRouteIndex({
19
- Component,
20
- children: [
21
- reference,
22
- ],
23
- });
@@ -1 +0,0 @@
1
- export * as Rollup from 'rollup';
@@ -1 +0,0 @@
1
- export * as Rollup from 'rollup';