@dagger.io/dagger 0.11.8 → 0.11.9

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 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../introspector/scanner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,GAAG,OAAO,CAU7D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAoBlD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,GAAG,OAAO,CAUhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,OAAO,CAAC,WAAW,CAAC,CA8DtB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../introspector/scanner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,GAAG,OAAO,CAU7D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAoBlD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,GAAG,OAAO,CAUhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,OAAO,CAAC,WAAW,CAAC,CAgDtB"}
@@ -64,6 +64,12 @@ export function typeToTypedef(checker, type) {
64
64
  typeDef: typeToTypedef(checker, typeArgs[0]),
65
65
  };
66
66
  }
67
+ if (type.symbol?.name && type.isClassOrInterface()) {
68
+ return {
69
+ kind: TypeDefKind.ObjectKind,
70
+ name: type.symbol.name,
71
+ };
72
+ }
67
73
  const strType = checker.typeToString(type);
68
74
  switch (strType) {
69
75
  case "string":
@@ -74,21 +80,7 @@ export function typeToTypedef(checker, type) {
74
80
  return { kind: TypeDefKind.BooleanKind };
75
81
  case "void":
76
82
  return { kind: TypeDefKind.VoidKind };
77
- // Intercept primitive types and throw error in this case
78
- case "String":
79
- throw new Error("Use of primitive String type detected, did you mean string?");
80
- case "Number":
81
- throw new Error("Use of primitive Number type detected, did you mean number?");
82
- case "Boolean":
83
- throw new Error("Use of primitive Boolean type detected, did you mean boolean?");
84
83
  default:
85
- // If it's a class or interface, it's an object
86
- if (type.symbol?.name && type.isClassOrInterface()) {
87
- return {
88
- kind: TypeDefKind.ObjectKind,
89
- name: strType,
90
- };
91
- }
92
84
  // If it's a union, then it's a scalar type
93
85
  if (type.isUnionOrIntersection()) {
94
86
  return {
@@ -1,2 +1,2 @@
1
- export declare const CLI_VERSION = "0.11.8";
1
+ export declare const CLI_VERSION = "0.11.9";
2
2
  //# sourceMappingURL=default.d.ts.map
@@ -1,2 +1,2 @@
1
1
  // Code generated by dagger. DO NOT EDIT.
2
- export const CLI_VERSION = "0.11.8";
2
+ export const CLI_VERSION = "0.11.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dagger.io/dagger",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "author": "hello@dagger.io",
5
5
  "license": "Apache-2.0",
6
6
  "types": "./dist/index.d.ts",