@typespec/compiler 0.65.0-dev.0 → 0.65.0-dev.10

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 (85) hide show
  1. package/dist/generated-defs/TypeSpec.d.ts +66 -32
  2. package/dist/generated-defs/TypeSpec.d.ts.map +1 -1
  3. package/dist/manifest.js +2 -2
  4. package/dist/src/core/binder.d.ts +1 -1
  5. package/dist/src/core/checker.d.ts.map +1 -1
  6. package/dist/src/core/checker.js +1 -2
  7. package/dist/src/core/checker.js.map +1 -1
  8. package/dist/src/core/compiler-code-fixes/convert-to-value.codefix.d.ts +10 -0
  9. package/dist/src/core/compiler-code-fixes/convert-to-value.codefix.d.ts.map +1 -0
  10. package/dist/src/core/compiler-code-fixes/convert-to-value.codefix.js +68 -0
  11. package/dist/src/core/compiler-code-fixes/convert-to-value.codefix.js.map +1 -0
  12. package/dist/src/core/visibility/core.d.ts +13 -0
  13. package/dist/src/core/visibility/core.d.ts.map +1 -1
  14. package/dist/src/core/visibility/core.js +19 -20
  15. package/dist/src/core/visibility/core.js.map +1 -1
  16. package/dist/src/core/visibility/index.d.ts +1 -1
  17. package/dist/src/core/visibility/index.d.ts.map +1 -1
  18. package/dist/src/core/visibility/index.js +1 -1
  19. package/dist/src/core/visibility/index.js.map +1 -1
  20. package/dist/src/core/visibility/lifecycle.d.ts.map +1 -1
  21. package/dist/src/core/visibility/lifecycle.js +8 -0
  22. package/dist/src/core/visibility/lifecycle.js.map +1 -1
  23. package/dist/src/emitter-framework/asset-emitter.js +23 -3
  24. package/dist/src/emitter-framework/asset-emitter.js.map +1 -1
  25. package/dist/src/emitter-framework/types.d.ts.map +1 -1
  26. package/dist/src/experimental/typekit/kits/literal.d.ts +61 -52
  27. package/dist/src/experimental/typekit/kits/literal.d.ts.map +1 -1
  28. package/dist/src/experimental/typekit/kits/literal.js.map +1 -1
  29. package/dist/src/experimental/typekit/kits/model-property.d.ts +11 -3
  30. package/dist/src/experimental/typekit/kits/model-property.d.ts.map +1 -1
  31. package/dist/src/experimental/typekit/kits/model-property.js.map +1 -1
  32. package/dist/src/experimental/typekit/kits/model.d.ts +41 -15
  33. package/dist/src/experimental/typekit/kits/model.d.ts.map +1 -1
  34. package/dist/src/experimental/typekit/kits/model.js +4 -0
  35. package/dist/src/experimental/typekit/kits/model.js.map +1 -1
  36. package/dist/src/experimental/typekit/kits/scalar.d.ts +349 -344
  37. package/dist/src/experimental/typekit/kits/scalar.d.ts.map +1 -1
  38. package/dist/src/experimental/typekit/kits/scalar.js.map +1 -1
  39. package/dist/src/experimental/typekit/kits/type.d.ts +5 -4
  40. package/dist/src/experimental/typekit/kits/type.d.ts.map +1 -1
  41. package/dist/src/experimental/typekit/kits/type.js.map +1 -1
  42. package/dist/src/experimental/typekit/kits/union-variant.d.ts +28 -15
  43. package/dist/src/experimental/typekit/kits/union-variant.d.ts.map +1 -1
  44. package/dist/src/experimental/typekit/kits/union-variant.js.map +1 -1
  45. package/dist/src/experimental/typekit/kits/union.d.ts +39 -30
  46. package/dist/src/experimental/typekit/kits/union.d.ts.map +1 -1
  47. package/dist/src/experimental/typekit/kits/union.js.map +1 -1
  48. package/dist/src/lib/visibility.d.ts +54 -0
  49. package/dist/src/lib/visibility.d.ts.map +1 -1
  50. package/dist/src/lib/visibility.js +84 -1
  51. package/dist/src/lib/visibility.js.map +1 -1
  52. package/dist/src/server/lib-provider.d.ts +23 -0
  53. package/dist/src/server/lib-provider.d.ts.map +1 -0
  54. package/dist/src/server/{emitter-provider.js → lib-provider.js} +25 -23
  55. package/dist/src/server/lib-provider.js.map +1 -0
  56. package/dist/src/server/serverlib.d.ts.map +1 -1
  57. package/dist/src/server/serverlib.js +5 -2
  58. package/dist/src/server/serverlib.js.map +1 -1
  59. package/dist/src/server/tspconfig/completion.d.ts +5 -3
  60. package/dist/src/server/tspconfig/completion.d.ts.map +1 -1
  61. package/dist/src/server/tspconfig/completion.js +234 -16
  62. package/dist/src/server/tspconfig/completion.js.map +1 -1
  63. package/dist/src/server/yaml-resolver.d.ts +20 -2
  64. package/dist/src/server/yaml-resolver.d.ts.map +1 -1
  65. package/dist/src/server/yaml-resolver.js +39 -6
  66. package/dist/src/server/yaml-resolver.js.map +1 -1
  67. package/lib/std/visibility.tsp +210 -36
  68. package/package.json +15 -11
  69. package/templates/__snapshots__/rest/.gitignore +9 -0
  70. package/templates/__snapshots__/rest/main.tsp +40 -0
  71. package/templates/__snapshots__/rest/package.json +20 -0
  72. package/templates/__snapshots__/rest/tspconfig.yaml +16 -0
  73. package/templates/rest/main.tsp +40 -0
  74. package/templates/scaffolding.json +51 -5
  75. package/dist/src/core/compiler-code-fixes/model-to-object-literal.codefix.d.ts +0 -6
  76. package/dist/src/core/compiler-code-fixes/model-to-object-literal.codefix.d.ts.map +0 -1
  77. package/dist/src/core/compiler-code-fixes/model-to-object-literal.codefix.js +0 -15
  78. package/dist/src/core/compiler-code-fixes/model-to-object-literal.codefix.js.map +0 -1
  79. package/dist/src/core/compiler-code-fixes/tuple-to-array-value.codefix.d.ts +0 -6
  80. package/dist/src/core/compiler-code-fixes/tuple-to-array-value.codefix.d.ts.map +0 -1
  81. package/dist/src/core/compiler-code-fixes/tuple-to-array-value.codefix.js +0 -15
  82. package/dist/src/core/compiler-code-fixes/tuple-to-array-value.codefix.js.map +0 -1
  83. package/dist/src/server/emitter-provider.d.ts +0 -22
  84. package/dist/src/server/emitter-provider.d.ts.map +0 -1
  85. package/dist/src/server/emitter-provider.js.map +0 -1
@@ -1,15 +0,0 @@
1
- import { defineCodeFix, getSourceLocation } from "../diagnostics.js";
2
- /**
3
- * Quick fix that convert a model expression to an object value.
4
- */
5
- export function createModelToObjectValueCodeFix(node) {
6
- return defineCodeFix({
7
- id: "model-to-object-value",
8
- label: `Convert to an object value \`#{}\``,
9
- fix: (context) => {
10
- const location = getSourceLocation(node);
11
- return context.prependText(location, "#");
12
- },
13
- });
14
- }
15
- //# sourceMappingURL=model-to-object-literal.codefix.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model-to-object-literal.codefix.js","sourceRoot":"","sources":["../../../../src/core/compiler-code-fixes/model-to-object-literal.codefix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGrE;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAAC,IAAyB;IACvE,OAAO,aAAa,CAAC;QACnB,EAAE,EAAE,uBAAuB;QAC3B,KAAK,EAAE,oCAAoC;QAC3C,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE;YACf,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACzC,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC5C,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { TupleExpressionNode } from "../types.js";
2
- /**
3
- * Quick fix that convert a tuple to an array value.
4
- */
5
- export declare function createTupleToArrayValueCodeFix(node: TupleExpressionNode): import("../types.js").CodeFix;
6
- //# sourceMappingURL=tuple-to-array-value.codefix.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tuple-to-array-value.codefix.d.ts","sourceRoot":"","sources":["../../../../src/core/compiler-code-fixes/tuple-to-array-value.codefix.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,mBAAmB,iCASvE"}
@@ -1,15 +0,0 @@
1
- import { defineCodeFix, getSourceLocation } from "../diagnostics.js";
2
- /**
3
- * Quick fix that convert a tuple to an array value.
4
- */
5
- export function createTupleToArrayValueCodeFix(node) {
6
- return defineCodeFix({
7
- id: "tuple-to-array-value",
8
- label: `Convert to an array value \`#[]\``,
9
- fix: (context) => {
10
- const location = getSourceLocation(node);
11
- return context.prependText(location, "#");
12
- },
13
- });
14
- }
15
- //# sourceMappingURL=tuple-to-array-value.codefix.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tuple-to-array-value.codefix.js","sourceRoot":"","sources":["../../../../src/core/compiler-code-fixes/tuple-to-array-value.codefix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGrE;;GAEG;AACH,MAAM,UAAU,8BAA8B,CAAC,IAAyB;IACtE,OAAO,aAAa,CAAC;QACnB,EAAE,EAAE,sBAAsB;QAC1B,KAAK,EAAE,mCAAmC;QAC1C,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE;YACf,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACzC,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC5C,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,22 +0,0 @@
1
- import { NpmPackage, NpmPackageProvider } from "./npm-package-provider.js";
2
- export declare class EmitterProvider {
3
- private npmPackageProvider;
4
- private isEmitterPackageCache;
5
- constructor(npmPackageProvider: NpmPackageProvider);
6
- /**
7
- *
8
- * @param startFolder folder starts to search for package.json with emitters defined as dependencies
9
- * @returns
10
- */
11
- listEmitters(startFolder: string): Promise<Record<string, NpmPackage>>;
12
- /**
13
- *
14
- * @param startFolder folder starts to search for package.json with emitters defined as dependencies
15
- * @param emitterName
16
- * @returns
17
- */
18
- getEmitter(startFolder: string, emitterName: string): Promise<NpmPackage | undefined>;
19
- private isEmitter;
20
- private getEmitterFromDep;
21
- }
22
- //# sourceMappingURL=emitter-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emitter-provider.d.ts","sourceRoot":"","sources":["../../../src/server/emitter-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,qBAAa,eAAe;IAEd,OAAO,CAAC,kBAAkB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