@codama/renderers-js 1.7.0 → 2.0.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/README.md +21 -19
- package/dist/index.browser.cjs +565 -465
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +565 -465
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.cjs +565 -465
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +565 -465
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.react-native.mjs +565 -465
- package/dist/index.react-native.mjs.map +1 -1
- package/dist/types/fragments/index.d.ts +1 -1
- package/dist/types/fragments/index.d.ts.map +1 -1
- package/dist/types/fragments/instructionInputDefault.d.ts.map +1 -1
- package/dist/types/fragments/instructionPage.d.ts +1 -0
- package/dist/types/fragments/instructionPage.d.ts.map +1 -1
- package/dist/types/fragments/programAccounts.d.ts.map +1 -1
- package/dist/types/fragments/programInstructions.d.ts.map +1 -1
- package/dist/types/fragments/programPage.d.ts +1 -1
- package/dist/types/fragments/programPage.d.ts.map +1 -1
- package/dist/types/fragments/programPlugin.d.ts +6 -0
- package/dist/types/fragments/programPlugin.d.ts.map +1 -0
- package/dist/types/utils/formatCode.d.ts +1 -1
- package/dist/types/utils/formatCode.d.ts.map +1 -1
- package/dist/types/utils/fragment.d.ts +1 -1
- package/dist/types/utils/fragment.d.ts.map +1 -1
- package/dist/types/utils/importMap.d.ts +3 -2
- package/dist/types/utils/importMap.d.ts.map +1 -1
- package/dist/types/utils/nameTransformers.d.ts +1 -1
- package/dist/types/utils/nameTransformers.d.ts.map +1 -1
- package/dist/types/utils/options.d.ts +28 -3
- package/dist/types/utils/options.d.ts.map +1 -1
- package/dist/types/utils/packageJson.d.ts +3 -3
- package/dist/types/utils/packageJson.d.ts.map +1 -1
- package/dist/types/visitors/getRenderMapVisitor.d.ts.map +1 -1
- package/dist/types/visitors/renderVisitor.d.ts +1 -1
- package/dist/types/visitors/renderVisitor.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/fragments/sharedPage.d.ts +0 -3
- package/dist/types/fragments/sharedPage.d.ts.map +0 -1
|
@@ -26,8 +26,8 @@ export * from './programAccounts';
|
|
|
26
26
|
export * from './programConstant';
|
|
27
27
|
export * from './programInstructions';
|
|
28
28
|
export * from './programPage';
|
|
29
|
+
export * from './programPlugin';
|
|
29
30
|
export * from './rootIndexPage';
|
|
30
|
-
export * from './sharedPage';
|
|
31
31
|
export * from './type';
|
|
32
32
|
export * from './typeCodec';
|
|
33
33
|
export * from './typeDecoder';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fragments/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fragments/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructionInputDefault.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionInputDefault.ts"],"names":[],"mappings":"AACA,OAAO,EAAgD,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAQ,wBAAwB,EAAS,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAGH,QAAQ,EAIR,WAAW,EAEd,MAAM,UAAU,CAAC;AAElB,wBAAgB,kCAAkC,CAC9C,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAC/F,KAAK,EAAE,wBAAwB,CAAC;IAChC,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,
|
|
1
|
+
{"version":3,"file":"instructionInputDefault.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionInputDefault.ts"],"names":[],"mappings":"AACA,OAAO,EAAgD,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAQ,wBAAwB,EAAS,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAGH,QAAQ,EAIR,WAAW,EAEd,MAAM,UAAU,CAAC;AAElB,wBAAgB,kCAAkC,CAC9C,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAC/F,KAAK,EAAE,wBAAwB,CAAC;IAChC,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CAwPV"}
|
|
@@ -6,4 +6,5 @@ export declare function getInstructionPageFragment(scope: Pick<RenderScope, 'asy
|
|
|
6
6
|
resolvedInputs: ResolvedInstructionInput[];
|
|
7
7
|
size: number | null;
|
|
8
8
|
}): Fragment;
|
|
9
|
+
export declare function getRenamedArgsMap(instruction: InstructionNode): Map<string, string>;
|
|
9
10
|
//# sourceMappingURL=instructionPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructionPage.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionPage.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,eAAe,EAA8C,MAAM,eAAe,CAAC;AACxH,OAAO,EAGH,QAAQ,EACR,wBAAwB,EAE3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAQjE,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CACP,WAAW,EACX,gBAAgB,GAAG,uBAAuB,GAAG,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,qBAAqB,CACjH,GAAG;IACA,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC3C,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,GACF,QAAQ,CAoCV"}
|
|
1
|
+
{"version":3,"file":"instructionPage.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionPage.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,eAAe,EAA8C,MAAM,eAAe,CAAC;AACxH,OAAO,EAGH,QAAQ,EACR,wBAAwB,EAE3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAQjE,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CACP,WAAW,EACX,gBAAgB,GAAG,uBAAuB,GAAG,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,qBAAqB,CACjH,GAAG;IACA,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC3C,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,GACF,QAAQ,CAoCV;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"programAccounts.d.ts","sourceRoot":"","sources":["../../../src/fragments/programAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"programAccounts.d.ts","sourceRoot":"","sources":["../../../src/fragments/programAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAA4B,WAAW,EAAO,MAAM,UAAU,CAAC;AAGhF,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAC1D,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,GAAG,SAAS,CAMtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"programInstructions.d.ts","sourceRoot":"","sources":["../../../src/fragments/programInstructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,WAAW,EAEd,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"programInstructions.d.ts","sourceRoot":"","sources":["../../../src/fragments/programInstructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,WAAW,EAEd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAA4B,WAAW,EAAO,MAAM,UAAU,CAAC;AAGhF,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,GAAG;IACvF,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,GAAG,SAAS,CAiBtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProgramNode } from '@codama/nodes';
|
|
2
2
|
import { Fragment, RenderScope } from '../utils';
|
|
3
|
-
export declare function getProgramPageFragment(scope: Pick<RenderScope, 'nameApi' | 'renderParentInstructions' | 'typeManifestVisitor'> & {
|
|
3
|
+
export declare function getProgramPageFragment(scope: Pick<RenderScope, 'asyncResolvers' | 'nameApi' | 'renderParentInstructions' | 'typeManifestVisitor'> & {
|
|
4
4
|
programNode: ProgramNode;
|
|
5
5
|
}): Fragment;
|
|
6
6
|
//# sourceMappingURL=programPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"programPage.d.ts","sourceRoot":"","sources":["../../../src/fragments/programPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"programPage.d.ts","sourceRoot":"","sources":["../../../src/fragments/programPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAMjE,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,SAAS,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,GAAG;IAC1G,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAUV"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProgramNode } from '@codama/nodes';
|
|
2
|
+
import { Fragment, RenderScope } from '../utils';
|
|
3
|
+
export declare function getProgramPluginFragment(scope: Pick<RenderScope, 'asyncResolvers' | 'nameApi'> & {
|
|
4
|
+
programNode: ProgramNode;
|
|
5
|
+
}): Fragment | undefined;
|
|
6
|
+
//# sourceMappingURL=programPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programPlugin.d.ts","sourceRoot":"","sources":["../../../src/fragments/programPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAMH,WAAW,EACd,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAA8C,WAAW,EAAO,MAAM,UAAU,CAAC;AAGlG,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAC,GAAG;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,GACtF,QAAQ,GAAG,SAAS,CAqBtB"}
|
|
@@ -3,5 +3,5 @@ import { format } from 'prettier/standalone';
|
|
|
3
3
|
import { RenderOptions } from './options';
|
|
4
4
|
export type PrettierOptions = Parameters<typeof format>[1];
|
|
5
5
|
export type CodeFormatter = (code: string, path: Path) => Promise<string>;
|
|
6
|
-
export declare function getCodeFormatter(options: Pick<RenderOptions, 'formatCode' | '
|
|
6
|
+
export declare function getCodeFormatter(packageFolder: string, options: Pick<RenderOptions, 'formatCode' | 'prettierOptions'>): Promise<CodeFormatter>;
|
|
7
7
|
//# sourceMappingURL=formatCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatCode.d.ts","sourceRoot":"","sources":["../../../src/utils/formatCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAKxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAM3D,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1E,wBAAsB,gBAAgB,CAClC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"formatCode.d.ts","sourceRoot":"","sources":["../../../src/utils/formatCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAKxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAM3D,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1E,wBAAsB,gBAAgB,CAClC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,iBAAiB,CAAC,GAC/D,OAAO,CAAC,aAAa,CAAC,CAWxB"}
|
|
@@ -20,5 +20,5 @@ export declare function removeFragmentImports(fragment: Fragment, module: string
|
|
|
20
20
|
export declare function addFragmentFeatures(fragment: Fragment, features: FragmentFeature[]): Fragment;
|
|
21
21
|
export declare function getExportAllFragment(module: string): Fragment;
|
|
22
22
|
export declare function getDocblockFragment(lines: Docs, withLineJump?: boolean): Fragment | undefined;
|
|
23
|
-
export declare function getPageFragment(page: Fragment, scope: Pick<RenderScope, 'dependencyMap' | '
|
|
23
|
+
export declare function getPageFragment(page: Fragment, scope: Pick<RenderScope, 'dependencyMap' | 'kitImportStrategy'>): Fragment;
|
|
24
24
|
//# sourceMappingURL=fragment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragment.d.ts","sourceRoot":"","sources":["../../../src/utils/fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,YAAY,EAA0B,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAGH,SAAS,EAKZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,eAAe,GAAG,mCAAmC,CAAC;AAElE,MAAM,MAAM,QAAQ,GAAG,YAAY,GAC/B,Q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M,GAAG,QAAQ,CAE7D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,UAAQ,GAAG,QAAQ,GAAG,SAAS,CAM3F;AAED,wBAAgB,eAAe,CAC3B,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,mBAAmB,CAAC,GAChE,QAAQ,CAaV"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { KitImportStrategy } from '.';
|
|
1
2
|
type ImportInput = string;
|
|
2
3
|
type Module = string;
|
|
3
4
|
type UsedIdentifier = string;
|
|
@@ -12,7 +13,7 @@ export declare function parseImportInput(input: ImportInput): ImportInfo;
|
|
|
12
13
|
export declare function addToImportMap(importMap: ImportMap, module: Module, imports: ImportInput[]): ImportMap;
|
|
13
14
|
export declare function removeFromImportMap(importMap: ImportMap, module: Module, usedIdentifiers: UsedIdentifier[]): ImportMap;
|
|
14
15
|
export declare function mergeImportMaps(importMaps: ImportMap[]): ImportMap;
|
|
15
|
-
export declare function importMapToString(importMap: ImportMap, dependencyMap?: Record<string, string>,
|
|
16
|
-
export declare function getExternalDependencies(importMap: ImportMap, dependencyMap: Record<string, string>,
|
|
16
|
+
export declare function importMapToString(importMap: ImportMap, dependencyMap?: Record<string, string>, kitImportStrategy?: KitImportStrategy): string;
|
|
17
|
+
export declare function getExternalDependencies(importMap: ImportMap, dependencyMap: Record<string, string>, kitImportStrategy: KitImportStrategy): Set<string>;
|
|
17
18
|
export {};
|
|
18
19
|
//# sourceMappingURL=importMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importMap.d.ts","sourceRoot":"","sources":["../../../src/utils/importMap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"importMap.d.ts","sourceRoot":"","sources":["../../../src/utils/importMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAwDnE,KAAK,WAAW,GAAG,MAAM,CAAC;AAC1B,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,cAAc,GAAG,MAAM,CAAC;AAC7B,KAAK,UAAU,GAAG,QAAQ,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;AAErF,wBAAgB,eAAe,IAAI,SAAS,CAE3C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAU/D;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,SAAS,CAGtG;AAED,wBAAgB,mBAAmB,CAC/B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,cAAc,EAAE,GAClC,SAAS,CAYX;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,CAyBlE;AAED,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,SAAS,EACpB,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAC1C,iBAAiB,GAAE,iBAA+C,GACnE,MAAM,CAmBR;AAED,wBAAgB,uBAAuB,CACnC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,iBAAiB,EAAE,iBAAiB,GACrC,GAAG,CAAC,MAAM,CAAC,CAWb"}
|
|
@@ -7,7 +7,7 @@ export type NameTransformerHelpers = {
|
|
|
7
7
|
titleCase: (name: string) => string;
|
|
8
8
|
};
|
|
9
9
|
export type NameTransformer = (name: string, helpers: NameTransformerHelpers) => string;
|
|
10
|
-
export type NameTransformerKey = 'accountDecodeFunction' | 'accountFetchAllFunction' | 'accountFetchAllMaybeFunction' | 'accountFetchFromSeedsFunction' | 'accountFetchFunction' | 'accountFetchMaybeFromSeedsFunction' | 'accountFetchMaybeFunction' | 'accountGetSizeFunction' | 'codecFunction' | 'constant' | 'constantFunction' | 'dataArgsType' | 'dataType' | 'decoderFunction' | 'discriminatedUnionDiscriminator' | 'discriminatedUnionFunction' | 'discriminatedUnionVariant' | 'encoderFunction' | 'enumVariant' | 'instructionAsyncFunction' | 'instructionAsyncInputType' | 'instructionDataType' | 'instructionExtraType' | 'instructionParsedType' | 'instructionParseFunction' | 'instructionSyncFunction' | 'instructionSyncInputType' | 'instructionType' | 'isDiscriminatedUnionFunction' | 'pdaFindFunction' | 'pdaSeedsType' | 'programAccountsEnum' | 'programAccountsEnumVariant' | 'programAccountsIdentifierFunction' | 'programAddressConstant' | 'programErrorConstant' | 'programErrorConstantPrefix' | 'programErrorMessagesMap' | 'programErrorUnion' | 'programGetErrorMessageFunction' | 'programInstructionsEnum' | 'programInstructionsEnumVariant' | 'programInstructionsIdentifierFunction' | 'programInstructionsParsedUnionType' | 'programInstructionsParseFunction' | 'programIsErrorFunction' | 'resolverFunction';
|
|
10
|
+
export type NameTransformerKey = 'accountDecodeFunction' | 'accountFetchAllFunction' | 'accountFetchAllMaybeFunction' | 'accountFetchFromSeedsFunction' | 'accountFetchFunction' | 'accountFetchMaybeFromSeedsFunction' | 'accountFetchMaybeFunction' | 'accountGetSizeFunction' | 'codecFunction' | 'constant' | 'constantFunction' | 'dataArgsType' | 'dataType' | 'decoderFunction' | 'discriminatedUnionDiscriminator' | 'discriminatedUnionFunction' | 'discriminatedUnionVariant' | 'encoderFunction' | 'enumVariant' | 'instructionAsyncFunction' | 'instructionAsyncInputType' | 'instructionDataType' | 'instructionExtraType' | 'instructionParsedType' | 'instructionParseFunction' | 'instructionSyncFunction' | 'instructionSyncInputType' | 'instructionType' | 'isDiscriminatedUnionFunction' | 'pdaFindFunction' | 'pdaSeedsType' | 'programAccountsEnum' | 'programAccountsEnumVariant' | 'programAccountsIdentifierFunction' | 'programAddressConstant' | 'programErrorConstant' | 'programErrorConstantPrefix' | 'programErrorMessagesMap' | 'programErrorUnion' | 'programGetErrorMessageFunction' | 'programInstructionsEnum' | 'programInstructionsEnumVariant' | 'programInstructionsIdentifierFunction' | 'programInstructionsParsedUnionType' | 'programInstructionsParseFunction' | 'programIsErrorFunction' | 'programPluginAccountKey' | 'programPluginAccountsType' | 'programPluginFunction' | 'programPluginInstructionKey' | 'programPluginInstructionsType' | 'programPluginKey' | 'programPluginRequirementsType' | 'programPluginType' | 'resolverFunction';
|
|
11
11
|
export type NameTransformers = Record<NameTransformerKey, NameTransformer>;
|
|
12
12
|
export type NameApi = Record<NameTransformerKey, (name: string) => string>;
|
|
13
13
|
export declare function getNameApi(transformers: NameTransformers): NameApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nameTransformers.d.ts","sourceRoot":"","sources":["../../../src/utils/nameTransformers.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,sBAAsB,GAAG;IACjC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,KAAK,MAAM,CAAC;AAExF,MAAM,MAAM,kBAAkB,GACxB,uBAAuB,GACvB,yBAAyB,GACzB,8BAA8B,GAC9B,+BAA+B,GAC/B,sBAAsB,GACtB,oCAAoC,GACpC,2BAA2B,GAC3B,wBAAwB,GACxB,eAAe,GACf,UAAU,GACV,kBAAkB,GAClB,cAAc,GACd,UAAU,GACV,iBAAiB,GACjB,iCAAiC,GACjC,4BAA4B,GAC5B,2BAA2B,GAC3B,iBAAiB,GACjB,aAAa,GACb,0BAA0B,GAC1B,2BAA2B,GAC3B,qBAAqB,GACrB,sBAAsB,GACtB,uBAAuB,GACvB,0BAA0B,GAC1B,yBAAyB,GACzB,0BAA0B,GAC1B,iBAAiB,GACjB,8BAA8B,GAC9B,iBAAiB,GACjB,cAAc,GACd,qBAAqB,GACrB,4BAA4B,GAC5B,mCAAmC,GACnC,wBAAwB,GACxB,sBAAsB,GACtB,4BAA4B,GAC5B,yBAAyB,GACzB,mBAAmB,GACnB,gCAAgC,GAChC,yBAAyB,GACzB,gCAAgC,GAChC,uCAAuC,GACvC,oCAAoC,GACpC,kCAAkC,GAClC,wBAAwB,GACxB,kBAAkB,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAE3E,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;AAE3E,wBAAgB,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAYlE;AAED,eAAO,MAAM,yBAAyB,EAAE,
|
|
1
|
+
{"version":3,"file":"nameTransformers.d.ts","sourceRoot":"","sources":["../../../src/utils/nameTransformers.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,sBAAsB,GAAG;IACjC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,UAA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kB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;AAE3E,wBAAgB,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAYlE;AAED,eAAO,MAAM,yBAAyB,EAAE,gBAwDvC,CAAC"}
|
|
@@ -8,7 +8,7 @@ import type { NameApi, NameTransformers } from './nameTransformers';
|
|
|
8
8
|
export type RenderOptions = GetRenderMapOptions & {
|
|
9
9
|
deleteFolderBeforeRendering?: boolean;
|
|
10
10
|
formatCode?: boolean;
|
|
11
|
-
|
|
11
|
+
generatedFolder?: string;
|
|
12
12
|
prettierOptions?: PrettierOptions;
|
|
13
13
|
syncPackageJson?: boolean;
|
|
14
14
|
};
|
|
@@ -19,11 +19,11 @@ export type GetRenderMapOptions = {
|
|
|
19
19
|
dependencyMap?: Record<string, string>;
|
|
20
20
|
dependencyVersions?: Record<string, string>;
|
|
21
21
|
internalNodes?: string[];
|
|
22
|
+
kitImportStrategy?: KitImportStrategy;
|
|
22
23
|
linkOverrides?: LinkOverrides;
|
|
23
24
|
nameTransformers?: Partial<NameTransformers>;
|
|
24
25
|
nonScalarEnums?: string[];
|
|
25
26
|
renderParentInstructions?: boolean;
|
|
26
|
-
useGranularImports?: boolean;
|
|
27
27
|
};
|
|
28
28
|
export type RenderScope = {
|
|
29
29
|
asyncResolvers: CamelCaseString[];
|
|
@@ -32,11 +32,36 @@ export type RenderScope = {
|
|
|
32
32
|
dependencyMap: Record<string, string>;
|
|
33
33
|
dependencyVersions: Record<string, string>;
|
|
34
34
|
getImportFrom: GetImportFromFunction;
|
|
35
|
+
kitImportStrategy: KitImportStrategy;
|
|
35
36
|
linkables: LinkableDictionary;
|
|
36
37
|
nameApi: NameApi;
|
|
37
38
|
nonScalarEnums: CamelCaseString[];
|
|
38
39
|
renderParentInstructions: boolean;
|
|
39
40
|
typeManifestVisitor: TypeManifestVisitor;
|
|
40
|
-
useGranularImports: boolean;
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Defines how generated code should import utilities that exist both as standalone
|
|
44
|
+
* packages (granular imports) and via the root `@solana/kit` package.
|
|
45
|
+
*
|
|
46
|
+
* Variants:
|
|
47
|
+
* - `'granular'`:
|
|
48
|
+
* Always import from the most specific standalone packages when possible
|
|
49
|
+
* (e.g. `@solana/addresses`, `@solana/codecs-strings`) and never from `@solana/kit`
|
|
50
|
+
* (except for symbols that are only exported from `@solana/kit`).
|
|
51
|
+
*
|
|
52
|
+
* - `'preferRoot'` (default):
|
|
53
|
+
* Prefer importing from `@solana/kit` when a symbol is exported from its root
|
|
54
|
+
* entrypoint. If it is not available from the root entrypoint, fall back to
|
|
55
|
+
* granular packages.
|
|
56
|
+
*
|
|
57
|
+
* - `'rootOnly'`:
|
|
58
|
+
* Only import from the `@solana/kit` package. When a symbol is not exported from
|
|
59
|
+
* the root entrypoint, the generator may use `@solana/kit` subpath exports
|
|
60
|
+
* (e.g. `@solana/kit/program-client-core`).
|
|
61
|
+
* This is useful when `@solana/kit` is installed as a `peerDependency`, but it may
|
|
62
|
+
* require TypeScript `moduleResolution: "bundler"` to resolve `@solana/kit`
|
|
63
|
+
* subpath exports correctly.
|
|
64
|
+
*/
|
|
65
|
+
export type KitImportStrategy = 'granular' | 'preferRoot' | 'rootOnly';
|
|
66
|
+
export declare const DEFAULT_KIT_IMPORT_STRATEGY: KitImportStrategy;
|
|
42
67
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/utils/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/E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EAAE,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,aAAa,EAAE,qBAAqB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,mBAAmB,EAAE,mBAAmB,CAAC;CAC5C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC;AAEvE,eAAO,MAAM,2BAA2B,EAAE,iBAAgC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RenderMap } from '@codama/renderers-core';
|
|
2
2
|
import type { CodeFormatter } from './formatCode';
|
|
3
3
|
import { Fragment } from './fragment';
|
|
4
|
-
import { RenderOptions } from './options';
|
|
4
|
+
import { KitImportStrategy, RenderOptions } from './options';
|
|
5
5
|
type DependencyVersions = Record<string, string>;
|
|
6
6
|
type PackageJson = {
|
|
7
7
|
author?: string;
|
|
@@ -16,11 +16,11 @@ type PackageJson = {
|
|
|
16
16
|
version?: string;
|
|
17
17
|
};
|
|
18
18
|
export declare const DEFAULT_DEPENDENCY_VERSIONS: DependencyVersions;
|
|
19
|
-
export declare function syncPackageJson(renderMap: RenderMap<Fragment>, formatCode: CodeFormatter, options: Pick<RenderOptions, 'dependencyMap' | 'dependencyVersions' | '
|
|
19
|
+
export declare function syncPackageJson(renderMap: RenderMap<Fragment>, formatCode: CodeFormatter, packageFolder: string, options: Pick<RenderOptions, 'dependencyMap' | 'dependencyVersions' | 'kitImportStrategy' | 'syncPackageJson'>): Promise<void>;
|
|
20
20
|
export declare function createNewPackageJson(dependencyVersions: DependencyVersions): PackageJson;
|
|
21
21
|
export declare function updateExistingPackageJson(packageJson: PackageJson, dependencyVersions: DependencyVersions): PackageJson;
|
|
22
22
|
export declare function checkExistingPackageJson(packageJson: PackageJson, dependencyVersions: DependencyVersions): void;
|
|
23
|
-
export declare function getUsedDependencyVersions(renderMap: RenderMap<Fragment>, dependencyMap: Record<string, string>, dependencyVersions: Record<string, string>,
|
|
23
|
+
export declare function getUsedDependencyVersions(renderMap: RenderMap<Fragment>, dependencyMap: Record<string, string>, dependencyVersions: Record<string, string>, kitImportStrategy: KitImportStrategy): DependencyVersions;
|
|
24
24
|
export declare function shouldUpdateRange(dependency: string, currentRange: string, requiredRange: string): boolean;
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=packageJson.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageJson.d.ts","sourceRoot":"","sources":["../../../src/utils/packageJson.ts"],"names":[],"mappings":"AACA,OAAO,EAAkC,SAAS,EAAa,MAAM,wBAAwB,CAAC;AAG9F,OAAO,KAAK,EAAE,aAAa,EAAE,MA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AAED,wBAAgB,oBAAoB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,WAAW,CAgBxF;AAED,wBAAgB,yBAAyB,CACrC,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,kBAAkB,GACvC,WAAW,CA+Bb;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CA0B/G;AAED,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1C,iBAAiB,EAAE,iBAAiB,GACrC,kBAAkB,CA8BpB;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,WA8BhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRenderMapVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/getRenderMapVisitor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRenderMapVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/getRenderMapVisitor.ts"],"names":[],"mappings":"AAiCA,OAAO,EAGH,QAAQ,EAKR,mBAAmB,EAGtB,MAAM,UAAU,CAAC;AAGlB,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,mBAAwB,iMAkJpE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RenderOptions } from '../utils';
|
|
2
|
-
export declare function renderVisitor(
|
|
2
|
+
export declare function renderVisitor(packageFolder: string, options?: RenderOptions): import("@codama/visitors-core").Visitor<Promise<void>, "rootNode">;
|
|
3
3
|
//# sourceMappingURL=renderVisitor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/renderVisitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,aAAa,EAAmB,MAAM,UAAU,CAAC;AAG5E,wBAAgB,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"renderVisitor.d.ts","sourceRoot":"","sources":["../../../src/visitors/renderVisitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,aAAa,EAAmB,MAAM,UAAU,CAAC;AAG5E,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,sEAsB/E"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sharedPage.d.ts","sourceRoot":"","sources":["../../../src/fragments/sharedPage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,QAAQ,EAAY,MAAM,UAAU,CAAC;AAElE,wBAAgB,qBAAqB,IAAI,QAAQ,CAqHhD"}
|