ember-repl 4.0.2 → 4.0.3

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.
Files changed (53) hide show
  1. package/declarations/__PRIVATE__.d.ts +2 -0
  2. package/declarations/__PRIVATE__.d.ts.map +1 -0
  3. package/declarations/compile/formats/gjs/babel.d.ts +7 -0
  4. package/declarations/compile/formats/gjs/babel.d.ts.map +1 -0
  5. package/declarations/compile/formats/gjs/eval.d.ts +8 -0
  6. package/declarations/compile/formats/gjs/eval.d.ts.map +1 -0
  7. package/declarations/compile/formats/gjs/index.d.ts +24 -0
  8. package/declarations/compile/formats/gjs/index.d.ts.map +1 -0
  9. package/declarations/compile/formats/gjs/known-modules.d.ts +65 -0
  10. package/declarations/compile/formats/gjs/known-modules.d.ts.map +1 -0
  11. package/declarations/compile/formats/hbs.d.ts +17 -0
  12. package/declarations/compile/formats/hbs.d.ts.map +1 -0
  13. package/declarations/compile/formats/markdown.d.ts +22 -0
  14. package/declarations/compile/formats/markdown.d.ts.map +1 -0
  15. package/declarations/compile/formats.d.ts +18 -0
  16. package/declarations/compile/formats.d.ts.map +1 -0
  17. package/declarations/compile/index.d.ts +72 -0
  18. package/declarations/compile/index.d.ts.map +1 -0
  19. package/declarations/compile/types.d.ts +22 -0
  20. package/declarations/compile/types.d.ts.map +1 -0
  21. package/declarations/compile/utils.d.ts +19 -0
  22. package/declarations/compile/utils.d.ts.map +1 -0
  23. package/declarations/index.d.ts +4 -0
  24. package/declarations/index.d.ts.map +1 -0
  25. package/declarations/test-support/index.d.ts +2 -0
  26. package/declarations/test-support/index.d.ts.map +1 -0
  27. package/dist/__PRIVATE__.js +2 -0
  28. package/dist/__PRIVATE__.js.map +1 -0
  29. package/dist/compile/formats/gjs/babel.js +2 -0
  30. package/dist/compile/formats/gjs/babel.js.map +1 -0
  31. package/dist/compile/formats/gjs/eval.js +20 -0
  32. package/dist/compile/formats/gjs/eval.js.map +1 -0
  33. package/dist/compile/formats/gjs/index.js +98 -0
  34. package/dist/compile/formats/gjs/index.js.map +1 -0
  35. package/dist/compile/formats/gjs/known-modules.js +48 -0
  36. package/dist/compile/formats/gjs/known-modules.js.map +1 -0
  37. package/dist/compile/formats/hbs.js +100 -0
  38. package/dist/compile/formats/hbs.js.map +1 -0
  39. package/dist/compile/formats/markdown.js +259 -0
  40. package/dist/compile/formats/markdown.js.map +1 -0
  41. package/dist/compile/formats.js +173 -0
  42. package/dist/compile/formats.js.map +1 -0
  43. package/dist/compile/index.js +113 -0
  44. package/dist/compile/index.js.map +1 -0
  45. package/dist/compile/types.js +2 -0
  46. package/dist/compile/types.js.map +1 -0
  47. package/dist/compile/utils.js +46 -0
  48. package/dist/compile/utils.js.map +1 -0
  49. package/dist/index.js +3 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/test-support/index.js +8 -0
  52. package/dist/test-support/index.js.map +1 -0
  53. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ export { CACHE } from './compile/index.ts';
2
+ //# sourceMappingURL=__PRIVATE__.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__PRIVATE__.d.ts","sourceRoot":"","sources":["../src/__PRIVATE__.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { availablePlugins, availablePresets, transform } from '@babel/standalone';
2
+ export interface Babel {
3
+ availablePlugins: typeof availablePlugins;
4
+ availablePresets: typeof availablePresets;
5
+ transform: typeof transform;
6
+ }
7
+ //# sourceMappingURL=babel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel.d.ts","sourceRoot":"","sources":["../../../../src/compile/formats/gjs/babel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEvF,MAAM,WAAW,KAAK;IACpB,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,SAAS,EAAE,OAAO,SAAS,CAAC;CAC7B"}
@@ -0,0 +1,8 @@
1
+ import type Component from '@glimmer/component';
2
+ export declare function evalSnippet(compiled: string, extraModules?: Record<string, unknown>): {
3
+ default: Component;
4
+ services?: {
5
+ [key: string]: unknown;
6
+ };
7
+ };
8
+ //# sourceMappingURL=eval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eval.d.ts","sourceRoot":"","sources":["../../../../src/compile/formats/gjs/eval.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAEhD,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAA4B,GAC/D;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACvC,CAkBA"}
@@ -0,0 +1,24 @@
1
+ import type { CompileResult } from '../../types.ts';
2
+ export interface Info {
3
+ code: string;
4
+ name: string;
5
+ }
6
+ /**
7
+ * @public
8
+ * Transpiles GlimmerJS (*.gjs) formatted text into and evaluates as a JS Module.
9
+ * The returned component can be invoked explicitly in the consuming project.
10
+ *
11
+ * SEE: README for example usage
12
+ *
13
+ * @param {string} code: the code to be compiled
14
+ * @param {Object} extraModules: map of import paths to modules. This isn't needed
15
+ * for classic ember projects, but for strict static ember projects, extraModules
16
+ * will need to be pasesd if compileJS is intended to be used in a styleguide or
17
+ * if there are additional modules that could be imported in the passed `code`.
18
+ *
19
+ * Later on, imports that are not present by default (ember/glimmer) or that
20
+ * are not provided by extraModules will be searched on npm to see if a package
21
+ * needs to be downloaded before running the `code` / invoking the component
22
+ */
23
+ export declare function compileJS(code: string, extraModules?: Record<string, unknown>): Promise<CompileResult>;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/compile/formats/gjs/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,aAAa,CAAC,CAkBxB"}
@@ -0,0 +1,65 @@
1
+ /// <reference types="ember-source/types/stable/@ember/component/template-only" />
2
+ /// <reference types="ember-source/types/stable/@ember/application" />
3
+ /// <reference types="ember-source/types/stable/@ember/array" />
4
+ /// <reference types="ember-source/types/stable/@ember/component" />
5
+ /// <reference types="ember-source/types/stable/@ember/component/helper" />
6
+ /// <reference types="ember-source/types/stable/@ember/debug" />
7
+ /// <reference types="ember-source/types/stable/@ember/destroyable" />
8
+ /// <reference types="ember-source/types/stable/@ember/helper" />
9
+ /// <reference types="ember-source/types/stable/@ember/modifier" />
10
+ /// <reference types="ember-source/types/stable/@ember/object" />
11
+ /// <reference types="ember-source/types/stable/@ember/runloop" />
12
+ /// <reference types="ember-source/types/stable/@ember/service" />
13
+ /// <reference types="ember-source/types/stable/@ember/routing/service-ext" />
14
+ /// <reference types="ember-source/types/stable/@ember/template-factory" />
15
+ /// <reference types="ember-source/types/stable/@ember/utils" />
16
+ /// <reference types="ember-source/types/stable/@ember/template" />
17
+ /// <reference types="ember-source/types/stable/@ember/owner" />
18
+ /// <reference types="ember-source/types/stable/@ember/controller/owner-ext" />
19
+ /// <reference types="ember-source/types/stable/@ember/routing/owner-ext" />
20
+ /// <reference types="ember-source/types/stable/@ember/service/owner-ext" />
21
+ /// <reference types="ember-source/types/stable/@glimmer/tracking" />
22
+ /**
23
+ * We need to import and hang on to these references so that they
24
+ * don't get optimized away during deploy
25
+ */
26
+ import _GlimmerComponent from '@glimmer/component';
27
+ import * as _tracking from '@glimmer/tracking';
28
+ import * as _application from '@ember/application';
29
+ import * as _array from '@ember/array';
30
+ import * as _EmberComponent from '@ember/component';
31
+ import * as _EmberComponentHelper from '@ember/component/helper';
32
+ import * as _debug from '@ember/debug';
33
+ import * as _destroyable from '@ember/destroyable';
34
+ import * as _helpers from '@ember/helper';
35
+ import * as _modifier from '@ember/modifier';
36
+ import * as _object from '@ember/object';
37
+ import * as _owner from '@ember/owner';
38
+ import * as _runloop from '@ember/runloop';
39
+ import * as _service from '@ember/service';
40
+ import * as _template from '@ember/template';
41
+ import { createTemplateFactory } from '@ember/template-factory';
42
+ import * as _utils from '@ember/utils';
43
+ export declare const modules: {
44
+ '@ember/application': typeof _application;
45
+ '@ember/array': typeof _array;
46
+ '@ember/component': typeof _EmberComponent;
47
+ '@ember/component/helper': typeof _EmberComponentHelper;
48
+ '@ember/component/template-only': <S>(moduleName?: string | undefined, name?: string | undefined) => import("@ember/component/template-only").TemplateOnlyComponent<S>;
49
+ '@ember/debug': typeof _debug;
50
+ '@ember/destroyable': typeof _destroyable;
51
+ '@ember/helper': typeof _helpers;
52
+ '@ember/modifier': typeof _modifier;
53
+ '@ember/object': typeof _object;
54
+ '@ember/runloop': typeof _runloop;
55
+ '@ember/service': typeof _service;
56
+ '@ember/template-factory': {
57
+ createTemplateFactory: typeof createTemplateFactory;
58
+ };
59
+ '@ember/utils': typeof _utils;
60
+ '@ember/template': typeof _template;
61
+ '@ember/owner': typeof _owner;
62
+ '@glimmer/component': typeof _GlimmerComponent;
63
+ '@glimmer/tracking': typeof _tracking;
64
+ };
65
+ //# sourceMappingURL=known-modules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-modules.d.ts","sourceRoot":"","sources":["../../../../src/compile/formats/gjs/known-modules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,eAAe,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CAoBnB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { CompileResult } from '../types.ts';
2
+ /**
3
+ * compile a template with an empty scope
4
+ * to use components, helpers, etc, you will need to compile with JS
5
+ *
6
+ * (templates alone do not have a way to import / define complex structures)
7
+ */
8
+ export declare function compileHBS(template: string, options?: CompileTemplateOptions): CompileResult;
9
+ interface CompileTemplateOptions {
10
+ /**
11
+ * Used for debug viewing
12
+ */
13
+ moduleName?: string;
14
+ scope?: Record<string, unknown>;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=hbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hbs.d.ts","sourceRoot":"","sources":["../../../src/compile/formats/hbs.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,aAAa,CAehG;AAED,UAAU,sBAAsB;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC"}
@@ -0,0 +1,22 @@
1
+ import type { UnifiedPlugin } from '../types.ts';
2
+ export interface ExtractedCode {
3
+ name: string;
4
+ code: string;
5
+ lang: string;
6
+ }
7
+ export interface LiveCodeExtraction {
8
+ templateOnlyGlimdown: string;
9
+ blocks: ExtractedCode[];
10
+ }
11
+ interface ParseMarkdownOptions {
12
+ CopyComponent?: string;
13
+ ShadowComponent?: string;
14
+ remarkPlugins?: UnifiedPlugin[];
15
+ rehypePlugins?: UnifiedPlugin[];
16
+ }
17
+ /**
18
+ * @internal not under semver
19
+ */
20
+ export declare function parseMarkdown(input: string, options?: ParseMarkdownOptions): Promise<LiveCodeExtraction>;
21
+ export {};
22
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/compile/formats/markdown.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAuSD,UAAU,oBAAoB;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,kBAAkB,CAAC,CAO7B"}
@@ -0,0 +1,18 @@
1
+ import type { CompileResult, UnifiedPlugin } from './types.ts';
2
+ import type { EvalImportMap, ScopeMap } from './types.ts';
3
+ export declare function compileGJS(gjsInput: string, importMap?: EvalImportMap): Promise<CompileResult>;
4
+ export declare function compileHBS(hbsInput: string, options?: {
5
+ moduleName?: string;
6
+ scope?: Record<string, unknown>;
7
+ }): Promise<CompileResult>;
8
+ export declare function compileMD(glimdownInput: string, options?: {
9
+ importMap?: EvalImportMap;
10
+ topLevelScope?: ScopeMap;
11
+ remarkPlugins?: UnifiedPlugin[];
12
+ rehypePlugins?: UnifiedPlugin[];
13
+ CopyComponent?: string;
14
+ ShadowComponent?: string;
15
+ }): Promise<CompileResult & {
16
+ rootTemplate?: string;
17
+ }>;
18
+ //# sourceMappingURL=formats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../src/compile/formats.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAY1D,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,aAAa,GACxB,OAAO,CAAC,aAAa,CAAC,CAQxB;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACR,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,GACA,OAAO,CAAC,aAAa,CAAC,CAQxB;AA2CD,wBAAsB,SAAS,CAC7B,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACA,OAAO,CAAC,aAAa,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAkFpD"}
@@ -0,0 +1,72 @@
1
+ import type { UnifiedPlugin } from './types.ts';
2
+ import type { EvalImportMap, ScopeMap } from './types.ts';
3
+ import type { ComponentLike } from '@glint/template';
4
+ type Format = 'glimdown' | 'gjs' | 'hbs';
5
+ export declare const CACHE: Map<string, ComponentLike>;
6
+ interface Events {
7
+ onSuccess: (component: ComponentLike) => Promise<unknown> | unknown;
8
+ onError: (error: string) => Promise<unknown> | unknown;
9
+ onCompileStart: () => Promise<unknown> | unknown;
10
+ }
11
+ interface Scope {
12
+ importMap?: EvalImportMap;
13
+ }
14
+ interface GlimdownOptions extends Scope, Events {
15
+ format: 'glimdown';
16
+ remarkPlugins?: UnifiedPlugin[];
17
+ rehypePlugins?: UnifiedPlugin[];
18
+ CopyComponent?: string;
19
+ ShadowComponent?: string;
20
+ topLevelScope?: ScopeMap;
21
+ }
22
+ interface GJSOptions extends Scope, Events {
23
+ format: 'gjs';
24
+ }
25
+ interface HBSOptions extends Scope, Events {
26
+ format: 'hbs';
27
+ topLevelScope?: ScopeMap;
28
+ }
29
+ /**
30
+ * Compile GitHub-flavored Markdown with GJS support
31
+ * and optionally render gjs-snippets via a `live` meta tag
32
+ * on the code fences.
33
+ */
34
+ export declare function compile(text: string, options: GlimdownOptions): Promise<void>;
35
+ /**
36
+ * Compile GJS
37
+ */
38
+ export declare function compile(text: string, options: GJSOptions): Promise<void>;
39
+ /**
40
+ * Compile a stateless component using just the template
41
+ */
42
+ export declare function compile(text: string, options: HBSOptions): Promise<void>;
43
+ type Input = string | undefined | null;
44
+ type ExtraOptions = {
45
+ format: 'glimdown';
46
+ remarkPlugins?: UnifiedPlugin[];
47
+ importMap?: EvalImportMap;
48
+ CopyComponent?: string;
49
+ ShadowComponent?: string;
50
+ topLevelScope?: ScopeMap;
51
+ } | {
52
+ format: 'hbs';
53
+ topLevelScope?: ScopeMap;
54
+ } | {
55
+ format: 'gjs';
56
+ importMap?: EvalImportMap;
57
+ };
58
+ /**
59
+ * @internal
60
+ */
61
+ export interface Value {
62
+ isReady: boolean;
63
+ error: string | null;
64
+ component: ComponentLike;
65
+ }
66
+ export declare function Compiled(markdownText: Input | (() => Input)): Value;
67
+ export declare function Compiled(markdownText: Input | (() => Input), options?: Format): Value;
68
+ export declare function Compiled(markdownText: Input | (() => Input), options?: () => Format): Value;
69
+ export declare function Compiled(markdownText: Input | (() => Input), options?: ExtraOptions): Value;
70
+ export declare function Compiled(markdownText: Input | (() => Input), options?: () => ExtraOptions): Value;
71
+ export {};
72
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,22 @@
1
+ import type { ComponentLike } from '@glint/template';
2
+ import type { Plugin } from 'unified';
3
+ export interface EvalImportMap {
4
+ [moduleName: string]: ScopeMap;
5
+ }
6
+ export interface ScopeMap {
7
+ [localName: string]: unknown;
8
+ }
9
+ export type UnifiedPlugin = Plugin;
10
+ export interface CompileResult {
11
+ component?: ComponentLike;
12
+ error?: Error;
13
+ name: string;
14
+ }
15
+ export type Options = {
16
+ /**
17
+ * @internal
18
+ * @deprecated do not use - not under semver
19
+ */
20
+ skypack?: boolean;
21
+ };
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/compile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,WAAW,aAAa;IAC5B,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;CAChC;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,OAAO,GAAG;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * For any given code block, a reasonably stable name can be
3
+ * generated.
4
+ * This can help with cacheing previously compiled components,
5
+ * and generally allowing a consumer to derive "known references" to user-input
6
+ */
7
+ export declare function nameFor(code: string, prefix?: string): string;
8
+ /**
9
+ * Returns the text for invoking a component with a given name.
10
+ * It is assumed the component takes no arguments, as would be the
11
+ * case in REPLs / Playgrounds for the "root" component.
12
+ */
13
+ export declare function invocationOf(name: string): string;
14
+ /**
15
+ * Core team does not want to support changes to '@ember/string' (v2 addonification, specifically)
16
+ * inflection does not support hyphens
17
+ */
18
+ export declare function invocationName(name: string): string;
19
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/compile/utils.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAiB,UAI5D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAWxC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAE1C"}
@@ -0,0 +1,4 @@
1
+ export { compile, Compiled } from './compile/index.ts';
2
+ export { invocationName, invocationOf, nameFor } from './compile/utils.ts';
3
+ export type { CompileResult } from './compile/types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG3E,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function clearCompileCache(): void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,SAEhC"}
@@ -0,0 +1,2 @@
1
+ export { CACHE } from './compile/index.js';
2
+ //# sourceMappingURL=__PRIVATE__.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__PRIVATE__.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=babel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { modules } from './known-modules.js';
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars */
4
+ function evalSnippet(compiled, extraModules = {}) {
5
+ const exports = {};
6
+ function require(moduleName) {
7
+ let preConfigured = modules[moduleName] || extraModules[moduleName];
8
+
9
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
+ // @ts-ignore
11
+ return preConfigured || window.require(moduleName);
12
+ }
13
+ eval(compiled);
14
+ return Object.assign(exports, {
15
+ require
16
+ });
17
+ }
18
+
19
+ export { evalSnippet };
20
+ //# sourceMappingURL=eval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eval.js","sources":["../../../../src/compile/formats/gjs/eval.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { modules } from './known-modules.ts';\n\nimport type Component from '@glimmer/component';\n\nexport function evalSnippet(\n compiled: string,\n extraModules: Record<string, unknown /* imported module */> = {}\n): {\n default: Component;\n services?: { [key: string]: unknown };\n} {\n const exports = {};\n\n function require(moduleName: keyof typeof modules): unknown {\n let preConfigured = modules[moduleName] || extraModules[moduleName];\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return preConfigured || window.require(moduleName);\n }\n\n eval(compiled);\n\n return Object.assign(exports, { require }) as {\n default: Component;\n services?: { [key: string]: unknown };\n require: unknown;\n };\n}\n"],"names":["evalSnippet","compiled","extraModules","exports","require","moduleName","preConfigured","modules","window","eval","Object","assign"],"mappings":";;AAAA;AAKO,SAASA,WAAWA,CACzBC,QAAgB,EAChBC,YAA2D,GAAG,EAAE,EAIhE;EACA,MAAMC,OAAO,GAAG,EAAE,CAAA;EAElB,SAASC,OAAOA,CAACC,UAAgC,EAAW;IAC1D,IAAIC,aAAa,GAAGC,OAAO,CAACF,UAAU,CAAC,IAAIH,YAAY,CAACG,UAAU,CAAC,CAAA;;AAEnE;AACA;AACA,IAAA,OAAOC,aAAa,IAAIE,MAAM,CAACJ,OAAO,CAACC,UAAU,CAAC,CAAA;AACpD,GAAA;EAEAI,IAAI,CAACR,QAAQ,CAAC,CAAA;AAEd,EAAA,OAAOS,MAAM,CAACC,MAAM,CAACR,OAAO,EAAE;AAAEC,IAAAA,OAAAA;AAAQ,GAAC,CAAC,CAAA;AAK5C;;;;"}
@@ -0,0 +1,98 @@
1
+ import { importSync } from '@embroider/macros';
2
+ import babelPluginEmberTemplateCompilation from 'babel-plugin-ember-template-compilation';
3
+ import { nameFor } from '../../utils.js';
4
+ import { evalSnippet } from './eval.js';
5
+
6
+ /**
7
+ * @public
8
+ * Transpiles GlimmerJS (*.gjs) formatted text into and evaluates as a JS Module.
9
+ * The returned component can be invoked explicitly in the consuming project.
10
+ *
11
+ * SEE: README for example usage
12
+ *
13
+ * @param {string} code: the code to be compiled
14
+ * @param {Object} extraModules: map of import paths to modules. This isn't needed
15
+ * for classic ember projects, but for strict static ember projects, extraModules
16
+ * will need to be pasesd if compileJS is intended to be used in a styleguide or
17
+ * if there are additional modules that could be imported in the passed `code`.
18
+ *
19
+ * Later on, imports that are not present by default (ember/glimmer) or that
20
+ * are not provided by extraModules will be searched on npm to see if a package
21
+ * needs to be downloaded before running the `code` / invoking the component
22
+ */
23
+ async function compileJS(code, extraModules) {
24
+ let name = nameFor(code);
25
+ let component;
26
+ let error;
27
+ try {
28
+ let compiled = await transpile({
29
+ code: code,
30
+ name
31
+ });
32
+ if (!compiled) {
33
+ throw new Error(`Compiled output is missing`);
34
+ }
35
+ component = evalSnippet(compiled, extraModules).default;
36
+ } catch (e) {
37
+ error = e;
38
+ }
39
+ return {
40
+ name,
41
+ component,
42
+ error
43
+ };
44
+ }
45
+ async function transpile({
46
+ code: input,
47
+ name
48
+ }) {
49
+ let preprocessed = await preprocess(input, name);
50
+ let result = await transform(preprocessed, name);
51
+ if (!result) {
52
+ return;
53
+ }
54
+ let {
55
+ code
56
+ } = result;
57
+ return code;
58
+ }
59
+ const compiler = importSync('ember-source/dist/ember-template-compiler.js');
60
+ let processor;
61
+ let fetchingPromise;
62
+ async function preprocess(input, name) {
63
+ if (!fetchingPromise) {
64
+ fetchingPromise = import('content-tag');
65
+ }
66
+ if (!processor) {
67
+ let {
68
+ Preprocessor
69
+ } = await fetchingPromise;
70
+ processor = new Preprocessor();
71
+ }
72
+ return processor.process(input, `${name}.js`);
73
+ }
74
+ async function transform(intermediate, name, options = {}) {
75
+ let babel = await import('@babel/standalone');
76
+ return babel.transform(intermediate, {
77
+ filename: `${name}.js`,
78
+ plugins: [
79
+ // [babelPluginIntermediateGJS],
80
+ [babelPluginEmberTemplateCompilation, {
81
+ compiler
82
+ }], [babel.availablePlugins['proposal-decorators'], {
83
+ legacy: true
84
+ }], [babel.availablePlugins['proposal-class-properties']]],
85
+ presets: [[babel.availablePresets['env'], {
86
+ // false -- keeps ES Modules
87
+ modules: 'cjs',
88
+ targets: {
89
+ esmodules: true
90
+ },
91
+ forceAllTransforms: false,
92
+ ...options
93
+ }]]
94
+ });
95
+ }
96
+
97
+ export { compileJS };
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/compile/formats/gjs/index.ts"],"sourcesContent":["import { importSync } from '@embroider/macros';\n\nimport babelPluginEmberTemplateCompilation from 'babel-plugin-ember-template-compilation';\n\nimport { nameFor } from '../../utils.ts';\nimport { evalSnippet } from './eval.ts';\n\nimport type { CompileResult } from '../../types.ts';\nimport type { ComponentLike } from '@glint/template';\n\nexport interface Info {\n code: string;\n name: string;\n}\n\n/**\n * @public\n * Transpiles GlimmerJS (*.gjs) formatted text into and evaluates as a JS Module.\n * The returned component can be invoked explicitly in the consuming project.\n *\n * SEE: README for example usage\n *\n * @param {string} code: the code to be compiled\n * @param {Object} extraModules: map of import paths to modules. This isn't needed\n * for classic ember projects, but for strict static ember projects, extraModules\n * will need to be pasesd if compileJS is intended to be used in a styleguide or\n * if there are additional modules that could be imported in the passed `code`.\n *\n * Later on, imports that are not present by default (ember/glimmer) or that\n * are not provided by extraModules will be searched on npm to see if a package\n * needs to be downloaded before running the `code` / invoking the component\n */\nexport async function compileJS(\n code: string,\n extraModules?: Record<string, unknown>\n): Promise<CompileResult> {\n let name = nameFor(code);\n let component: undefined | ComponentLike;\n let error: undefined | Error;\n\n try {\n let compiled = await transpile({ code: code, name });\n\n if (!compiled) {\n throw new Error(`Compiled output is missing`);\n }\n\n component = evalSnippet(compiled, extraModules).default as unknown as ComponentLike;\n } catch (e) {\n error = e as Error | undefined;\n }\n\n return { name, component, error };\n}\n\nasync function transpile({ code: input, name }: Info) {\n let preprocessed = await preprocess(input, name);\n let result = await transform(preprocessed, name);\n\n if (!result) {\n return;\n }\n\n let { code } = result;\n\n return code;\n}\n\nimport type { Babel } from './babel.ts';\n\nconst compiler = importSync('ember-source/dist/ember-template-compiler.js');\n\nlet processor: any;\nlet fetchingPromise: Promise<any>;\n\nasync function preprocess(input: string, name: string): Promise<string> {\n if (!fetchingPromise) {\n fetchingPromise = import('content-tag');\n }\n\n if (!processor) {\n let { Preprocessor } = await fetchingPromise;\n\n processor = new Preprocessor();\n }\n\n return processor.process(input, `${name}.js`);\n}\n\nasync function transform(\n intermediate: string,\n name: string,\n options: any = {}\n): Promise<ReturnType<Babel['transform']>> {\n let babel = (await import('@babel/standalone')) as Babel;\n\n return babel.transform(intermediate, {\n filename: `${name}.js`,\n plugins: [\n // [babelPluginIntermediateGJS],\n [\n babelPluginEmberTemplateCompilation,\n {\n compiler,\n },\n ],\n [babel.availablePlugins['proposal-decorators'], { legacy: true }],\n [babel.availablePlugins['proposal-class-properties']],\n ],\n presets: [\n [\n babel.availablePresets['env'],\n {\n // false -- keeps ES Modules\n modules: 'cjs',\n targets: { esmodules: true },\n forceAllTransforms: false,\n ...options,\n },\n ],\n ],\n });\n}\n"],"names":["compileJS","code","extraModules","name","nameFor","component","error","compiled","transpile","Error","evalSnippet","default","e","input","preprocessed","preprocess","result","transform","compiler","importSync","processor","fetchingPromise","Preprocessor","process","intermediate","options","babel","filename","plugins","babelPluginEmberTemplateCompilation","availablePlugins","legacy","presets","availablePresets","modules","targets","esmodules","forceAllTransforms"],"mappings":"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"}
@@ -0,0 +1,48 @@
1
+ import _GlimmerComponent from '@glimmer/component';
2
+ import * as _tracking from '@glimmer/tracking';
3
+ import * as _application from '@ember/application';
4
+ import * as _array from '@ember/array';
5
+ import * as _EmberComponent from '@ember/component';
6
+ import * as _EmberComponentHelper from '@ember/component/helper';
7
+ import _TO from '@ember/component/template-only';
8
+ import * as _debug from '@ember/debug';
9
+ import * as _destroyable from '@ember/destroyable';
10
+ import * as _helpers from '@ember/helper';
11
+ import * as _modifier from '@ember/modifier';
12
+ import * as _object from '@ember/object';
13
+ import * as _owner from '@ember/owner';
14
+ import * as _runloop from '@ember/runloop';
15
+ import * as _service from '@ember/service';
16
+ import * as _template from '@ember/template';
17
+ import { createTemplateFactory } from '@ember/template-factory';
18
+ import * as _utils from '@ember/utils';
19
+
20
+ /**
21
+ * We need to import and hang on to these references so that they
22
+ * don't get optimized away during deploy
23
+ */
24
+ const modules = {
25
+ '@ember/application': _application,
26
+ '@ember/array': _array,
27
+ '@ember/component': _EmberComponent,
28
+ '@ember/component/helper': _EmberComponentHelper,
29
+ '@ember/component/template-only': _TO,
30
+ '@ember/debug': _debug,
31
+ '@ember/destroyable': _destroyable,
32
+ '@ember/helper': _helpers,
33
+ '@ember/modifier': _modifier,
34
+ '@ember/object': _object,
35
+ '@ember/runloop': _runloop,
36
+ '@ember/service': _service,
37
+ '@ember/template-factory': {
38
+ createTemplateFactory
39
+ },
40
+ '@ember/utils': _utils,
41
+ '@ember/template': _template,
42
+ '@ember/owner': _owner,
43
+ '@glimmer/component': _GlimmerComponent,
44
+ '@glimmer/tracking': _tracking
45
+ };
46
+
47
+ export { modules };
48
+ //# sourceMappingURL=known-modules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-modules.js","sources":["../../../../src/compile/formats/gjs/known-modules.ts"],"sourcesContent":["/**\n * We need to import and hang on to these references so that they\n * don't get optimized away during deploy\n */\nimport _GlimmerComponent from '@glimmer/component';\nimport * as _tracking from '@glimmer/tracking';\nimport * as _application from '@ember/application';\nimport * as _array from '@ember/array';\nimport * as _EmberComponent from '@ember/component';\nimport * as _EmberComponentHelper from '@ember/component/helper';\nimport _TO from '@ember/component/template-only';\nimport * as _debug from '@ember/debug';\nimport * as _destroyable from '@ember/destroyable';\nimport * as _helpers from '@ember/helper';\nimport * as _modifier from '@ember/modifier';\nimport * as _object from '@ember/object';\nimport * as _owner from '@ember/owner';\nimport * as _runloop from '@ember/runloop';\nimport * as _service from '@ember/service';\nimport * as _template from '@ember/template';\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { createTemplateFactory } from '@ember/template-factory';\nimport * as _utils from '@ember/utils';\n\nexport const modules = {\n '@ember/application': _application,\n '@ember/array': _array,\n '@ember/component': _EmberComponent,\n '@ember/component/helper': _EmberComponentHelper,\n '@ember/component/template-only': _TO,\n '@ember/debug': _debug,\n '@ember/destroyable': _destroyable,\n '@ember/helper': _helpers,\n '@ember/modifier': _modifier,\n '@ember/object': _object,\n '@ember/runloop': _runloop,\n '@ember/service': _service,\n '@ember/template-factory': { createTemplateFactory },\n '@ember/utils': _utils,\n '@ember/template': _template,\n '@ember/owner': _owner,\n\n '@glimmer/component': _GlimmerComponent,\n '@glimmer/tracking': _tracking,\n};\n"],"names":["modules","_application","_array","_EmberComponent","_EmberComponentHelper","_TO","_debug","_destroyable","_helpers","_modifier","_object","_runloop","_service","createTemplateFactory","_utils","_template","_owner","_GlimmerComponent","_tracking"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAsBO,MAAMA,OAAO,GAAG;AACrB,EAAA,oBAAoB,EAAEC,YAAY;AAClC,EAAA,cAAc,EAAEC,MAAM;AACtB,EAAA,kBAAkB,EAAEC,eAAe;AACnC,EAAA,yBAAyB,EAAEC,qBAAqB;AAChD,EAAA,gCAAgC,EAAEC,GAAG;AACrC,EAAA,cAAc,EAAEC,MAAM;AACtB,EAAA,oBAAoB,EAAEC,YAAY;AAClC,EAAA,eAAe,EAAEC,QAAQ;AACzB,EAAA,iBAAiB,EAAEC,SAAS;AAC5B,EAAA,eAAe,EAAEC,OAAO;AACxB,EAAA,gBAAgB,EAAEC,QAAQ;AAC1B,EAAA,gBAAgB,EAAEC,QAAQ;AAC1B,EAAA,yBAAyB,EAAE;AAAEC,IAAAA,qBAAAA;GAAuB;AACpD,EAAA,cAAc,EAAEC,MAAM;AACtB,EAAA,iBAAiB,EAAEC,SAAS;AAC5B,EAAA,cAAc,EAAEC,MAAM;AAEtB,EAAA,oBAAoB,EAAEC,iBAAiB;AACvC,EAAA,mBAAmB,EAAEC,SAAAA;AACvB;;;;"}