@openzeppelin/upgrades-core 1.9.2 → 1.12.0

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 (127) hide show
  1. package/LICENSE +22 -0
  2. package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
  3. package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +4 -0
  4. package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json +80 -0
  5. package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +4 -0
  6. package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +113 -0
  7. package/artifacts/AdminUpgradeabilityProxy.json +2 -2
  8. package/artifacts/contracts/proxy/AdminUpgradeabilityProxy.sol/AdminUpgradeabilityProxy.json +2 -2
  9. package/dist/beacon.d.ts +8 -0
  10. package/dist/beacon.d.ts.map +1 -0
  11. package/dist/beacon.js +25 -0
  12. package/dist/beacon.js.map +1 -0
  13. package/dist/deployment.d.ts +14 -3
  14. package/dist/deployment.d.ts.map +1 -1
  15. package/dist/deployment.js +20 -13
  16. package/dist/deployment.js.map +1 -1
  17. package/dist/deployment.test.js +23 -0
  18. package/dist/deployment.test.js.map +1 -1
  19. package/dist/eip-1967-type.d.ts +4 -0
  20. package/dist/eip-1967-type.d.ts.map +1 -0
  21. package/dist/eip-1967-type.js +37 -0
  22. package/dist/eip-1967-type.js.map +1 -0
  23. package/dist/eip-1967.d.ts +5 -0
  24. package/dist/eip-1967.d.ts.map +1 -1
  25. package/dist/eip-1967.js +19 -12
  26. package/dist/eip-1967.js.map +1 -1
  27. package/dist/impl-address.d.ts +19 -0
  28. package/dist/impl-address.d.ts.map +1 -0
  29. package/dist/impl-address.js +67 -0
  30. package/dist/impl-address.js.map +1 -0
  31. package/dist/impl-store.d.ts +3 -2
  32. package/dist/impl-store.d.ts.map +1 -1
  33. package/dist/impl-store.js +21 -10
  34. package/dist/impl-store.js.map +1 -1
  35. package/dist/index.d.ts +7 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +23 -3
  38. package/dist/index.js.map +1 -1
  39. package/dist/manifest.d.ts +1 -1
  40. package/dist/manifest.d.ts.map +1 -1
  41. package/dist/provider.d.ts +2 -0
  42. package/dist/provider.d.ts.map +1 -1
  43. package/dist/provider.js +11 -1
  44. package/dist/provider.js.map +1 -1
  45. package/dist/proxy-kind.d.ts +12 -0
  46. package/dist/proxy-kind.d.ts.map +1 -0
  47. package/dist/proxy-kind.js +50 -0
  48. package/dist/proxy-kind.js.map +1 -0
  49. package/dist/standalone.d.ts +19 -0
  50. package/dist/standalone.d.ts.map +1 -0
  51. package/dist/standalone.js +24 -0
  52. package/dist/standalone.js.map +1 -0
  53. package/dist/standalone.test.d.ts +2 -0
  54. package/dist/standalone.test.d.ts.map +1 -0
  55. package/dist/standalone.test.js +33 -0
  56. package/dist/standalone.test.js.map +1 -0
  57. package/dist/storage/index.d.ts +7 -0
  58. package/dist/storage/index.d.ts.map +1 -1
  59. package/dist/storage/index.js +11 -5
  60. package/dist/storage/index.js.map +1 -1
  61. package/dist/storage/report.d.ts +3 -2
  62. package/dist/storage/report.d.ts.map +1 -1
  63. package/dist/storage/report.js +9 -3
  64. package/dist/storage/report.js.map +1 -1
  65. package/dist/usage-error.d.ts +21 -0
  66. package/dist/usage-error.d.ts.map +1 -0
  67. package/dist/usage-error.js +51 -0
  68. package/dist/usage-error.js.map +1 -0
  69. package/dist/utils/address.d.ts +8 -0
  70. package/dist/utils/address.d.ts.map +1 -0
  71. package/dist/utils/address.js +20 -0
  72. package/dist/utils/address.js.map +1 -0
  73. package/dist/utils/make-non-enumerable.d.ts +1 -1
  74. package/dist/utils/make-non-enumerable.d.ts.map +1 -1
  75. package/dist/utils/make-non-enumerable.js.map +1 -1
  76. package/dist/validate/error.d.ts.map +1 -1
  77. package/dist/validate/error.js +2 -65
  78. package/dist/validate/error.js.map +1 -1
  79. package/dist/validate/index.d.ts +2 -1
  80. package/dist/validate/index.d.ts.map +1 -1
  81. package/dist/validate/index.js +4 -1
  82. package/dist/validate/index.js.map +1 -1
  83. package/dist/validate/overrides.js +1 -1
  84. package/dist/validate/overrides.js.map +1 -1
  85. package/dist/validate/query.d.ts +3 -1
  86. package/dist/validate/query.d.ts.map +1 -1
  87. package/dist/validate/query.js +23 -7
  88. package/dist/validate/query.js.map +1 -1
  89. package/dist/validate/report.d.ts +8 -0
  90. package/dist/validate/report.d.ts.map +1 -0
  91. package/dist/validate/report.js +79 -0
  92. package/dist/validate/report.js.map +1 -0
  93. package/dist/version.d.ts +3 -3
  94. package/dist/version.d.ts.map +1 -1
  95. package/dist/version.js +12 -6
  96. package/dist/version.js.map +1 -1
  97. package/package.json +8 -5
  98. package/src/beacon.ts +20 -0
  99. package/src/deployment.test.ts +25 -0
  100. package/src/deployment.ts +43 -13
  101. package/src/eip-1967-type.ts +35 -0
  102. package/src/eip-1967.ts +16 -12
  103. package/src/impl-address.ts +76 -0
  104. package/src/impl-store.ts +23 -7
  105. package/src/index.ts +18 -1
  106. package/src/manifest.ts +1 -1
  107. package/src/provider.ts +16 -0
  108. package/src/proxy-kind.ts +59 -0
  109. package/src/standalone.test.ts +40 -0
  110. package/src/standalone.ts +41 -0
  111. package/src/storage/index.ts +14 -4
  112. package/src/storage/report.ts +10 -5
  113. package/src/usage-error.ts +68 -0
  114. package/src/utils/address.ts +16 -0
  115. package/src/utils/make-non-enumerable.ts +1 -1
  116. package/src/validate/error.ts +5 -67
  117. package/src/validate/index.ts +2 -0
  118. package/src/validate/overrides.ts +1 -1
  119. package/src/validate/query.ts +24 -6
  120. package/src/validate/report.ts +78 -0
  121. package/src/version.ts +14 -6
  122. package/CHANGELOG.md +0 -114
  123. package/dist/set-proxy-kind.d.ts +0 -5
  124. package/dist/set-proxy-kind.d.ts.map +0 -1
  125. package/dist/set-proxy-kind.js +0 -25
  126. package/dist/set-proxy-kind.js.map +0 -1
  127. package/src/set-proxy-kind.ts +0 -27
@@ -0,0 +1,78 @@
1
+ import _chalk from 'chalk';
2
+
3
+ import { ErrorDescriptions } from '../error';
4
+ import { ValidationError } from './run';
5
+
6
+ export class UpgradeableContractErrorReport {
7
+ constructor(readonly errors: ValidationError[]) {}
8
+
9
+ get ok(): boolean {
10
+ return this.errors.length === 0;
11
+ }
12
+
13
+ explain(color = true): string {
14
+ return this.errors.map(e => describeError(e, color)).join('\n\n');
15
+ }
16
+ }
17
+
18
+ const errorInfo: ErrorDescriptions<ValidationError> = {
19
+ constructor: {
20
+ msg: e => `Contract \`${e.contract}\` has a constructor`,
21
+ hint: () => 'Define an initializer instead',
22
+ link: 'https://zpl.in/upgrades/error-001',
23
+ },
24
+ delegatecall: {
25
+ msg: () => `Use of delegatecall is not allowed`,
26
+ link: 'https://zpl.in/upgrades/error-002',
27
+ },
28
+ selfdestruct: {
29
+ msg: () => `Use of selfdestruct is not allowed`,
30
+ link: 'https://zpl.in/upgrades/error-003',
31
+ },
32
+ 'state-variable-assignment': {
33
+ msg: e => `Variable \`${e.name}\` is assigned an initial value`,
34
+ hint: () => 'Move the assignment to the initializer',
35
+ link: 'https://zpl.in/upgrades/error-004',
36
+ },
37
+ 'state-variable-immutable': {
38
+ msg: e => `Variable \`${e.name}\` is immutable`,
39
+ hint: () => `Use a constant or mutable variable instead`,
40
+ link: 'https://zpl.in/upgrades/error-005',
41
+ },
42
+ 'external-library-linking': {
43
+ msg: e => `Linking external libraries like \`${e.name}\` is not yet supported`,
44
+ hint: () =>
45
+ `Use libraries with internal functions only, or skip this check with the \`unsafeAllowLinkedLibraries\` flag \n` +
46
+ ` if you have manually checked that the libraries are upgrade safe`,
47
+ link: 'https://zpl.in/upgrades/error-006',
48
+ },
49
+ 'struct-definition': {
50
+ msg: e => `Structs like \`${e.name}\` are supported in the latest version of the plugin`,
51
+ hint: () => `Update your dependency and run again`,
52
+ },
53
+ 'enum-definition': {
54
+ msg: e => `Enums like \`${e.name}\` are supported in the latest version of the plugin`,
55
+ hint: () => `Update your dependency and run again`,
56
+ },
57
+ 'missing-public-upgradeto': {
58
+ msg: () => `Implementation is missing a public \`upgradeTo(address)\` function`,
59
+ hint: () =>
60
+ `Inherit UUPSUpgradeable to include this function in your contract\n` +
61
+ ` @openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol`,
62
+ link: 'https://zpl.in/upgrades/error-008',
63
+ },
64
+ };
65
+
66
+ function describeError(e: ValidationError, color = true): string {
67
+ const chalk = new _chalk.Instance({ level: color && _chalk.supportsColor ? _chalk.supportsColor.level : 0 });
68
+ const info = errorInfo[e.kind];
69
+ const log = [chalk.bold(e.src) + ': ' + info.msg(e as any)];
70
+ const hint = info.hint?.(e as any);
71
+ if (hint) {
72
+ log.push(hint);
73
+ }
74
+ if (info.link) {
75
+ log.push(chalk.dim(info.link));
76
+ }
77
+ return log.join('\n ');
78
+ }
package/src/version.ts CHANGED
@@ -7,19 +7,19 @@ export interface Version {
7
7
  linkedWithoutMetadata: string;
8
8
  }
9
9
 
10
- export function getVersion(bytecode: string, linkedBytecode?: string): Version {
10
+ export function getVersion(bytecode: string, linkedBytecode?: string, constructorArgs = ''): Version {
11
11
  if (bytecode !== '') {
12
12
  return {
13
13
  withMetadata: hashBytecode(bytecode),
14
14
  withoutMetadata: hashBytecodeWithoutMetadata(bytecode),
15
- linkedWithoutMetadata: hashBytecodeWithoutMetadata(linkedBytecode ?? bytecode),
15
+ linkedWithoutMetadata: hashBytecodeWithoutMetadata(linkedBytecode ?? bytecode, constructorArgs),
16
16
  };
17
17
  } else {
18
18
  throw new Error('Abstract contract not allowed here');
19
19
  }
20
20
  }
21
21
 
22
- export function hashBytecode(bytecode: string): string {
22
+ export function hashBytecode(bytecode: string, constructorArgs = ''): string {
23
23
  bytecode = bytecode
24
24
  .replace(/__\$([0-9a-fA-F]{34})\$__/g, (_, placeholder) => `000${placeholder}000`)
25
25
  .replace(/__\w{36}__/g, placeholder => keccak256(Buffer.from(placeholder)).toString('hex', 0, 20));
@@ -31,12 +31,20 @@ export function hashBytecode(bytecode: string): string {
31
31
  throw new Error('Bytecode is not a valid hex string');
32
32
  }
33
33
 
34
- const buf = Buffer.from(bytecode.replace(/^0x/, ''), 'hex');
34
+ if (!/^(0x)?[0-9a-fA-F]*$/.test(constructorArgs)) {
35
+ throw new Error('Constructor arguments are not a valid hex string');
36
+ }
37
+
38
+ const buf = Buffer.concat([
39
+ Buffer.from(bytecode.replace(/^0x/, ''), 'hex'),
40
+ Buffer.from(constructorArgs.replace(/^0x/, ''), 'hex'),
41
+ ]);
42
+
35
43
  return keccak256(buf).toString('hex');
36
44
  }
37
45
 
38
- export function hashBytecodeWithoutMetadata(bytecode: string): string {
39
- return hashBytecode(trimBytecodeMetadata(bytecode));
46
+ export function hashBytecodeWithoutMetadata(bytecode: string, constructorArgs = ''): string {
47
+ return hashBytecode(trimBytecodeMetadata(bytecode), constructorArgs);
40
48
  }
41
49
 
42
50
  function trimBytecodeMetadata(bytecode: string): string {
package/CHANGELOG.md DELETED
@@ -1,114 +0,0 @@
1
- # Changelog
2
-
3
- ## 1.9.2 (2021-09-17)
4
-
5
- - Fix a bug where libraries used transitively were not considered for safety checks.
6
-
7
- ## 1.9.1 (2021-09-15)
8
-
9
- - Silence all warnings when using `silenceWarnings`.
10
-
11
- ## 1.9.0 (2021-08-25)
12
-
13
- - Add `getBeaconAddress`. ([#413](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/413))
14
-
15
- ## 1.8.1 (2021-08-06)
16
-
17
- - Add support for function types.
18
-
19
- ## 1.8.0 (2021-06-29)
20
-
21
- - Add option `unsafeAllowRenames` to configure storage layout check to allow variable renaming.
22
-
23
- ## 1.7.6 (2021-05-25)
24
-
25
- - Fix recognition of value types in storage layouts.
26
-
27
- ## 1.7.5 (2021-05-22)
28
-
29
- - Fix exception when upgrading mapping key to enum.
30
-
31
- ## 1.7.4 (2021-05-22)
32
-
33
- - Fix handling of functions with struct or mapping storage pointer arguments.
34
-
35
- ## 1.7.3 (2021-05-13)
36
-
37
- - Simplify clean up of manifest data before storing to disk.
38
-
39
- ## 1.7.2 (2021-05-13)
40
-
41
- - Fix bug when the project uses external libraries.
42
-
43
- ## 1.7.1 (2021-05-03)
44
-
45
- - Use `web3_clientVersion` to better detect development networks.
46
-
47
- ## 1.7.0 (2021-04-29)
48
-
49
- - Add support for UUPS proxies. ([#315](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/315))
50
- - Fix parsing of NatSpec `@custom:oz-upgrades-unsafe-allow` when included in a `/**`-style comment.
51
-
52
- ## 1.6.0 (2021-04-14)
53
- - Add `unsafeAllow` as a new field in `ValidationOptions`, which can be used as a manual override to silence any type of validation error. For example, `opts = { unsafeAllow: ['external-library-linking', 'delegatecall'] }` will silence the corresponding checks. ([#320](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/320))
54
- - Custom NatSpec comments can disable error checks directly from the Solidity code. See `core/contracts/test/ValidationNatspec.sol` for example usage of these NatSpec comments. Note: this requires Solidity >=0.8.2. ([#320](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/320))
55
- - Fix a bug with library placeholders when hashing contract source code. ([#320](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/320))
56
-
57
- ## 1.5.1 (2021-02-24)
58
-
59
- - Add support for enum keys in mappings. ([#301](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/301))
60
-
61
- ## 1.5.0 (2021-01-27)
62
-
63
- - Add support for structs and enums. ([#261](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/261))
64
- - Enable optimizations when compiling proxies.
65
-
66
- ## 1.4.4 (2021-01-14)
67
-
68
- - Fix `InvalidDeployment` error on some networks. ([#282](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/282))
69
-
70
- ## 1.4.3 (2020-12-21)
71
-
72
- - Fix a type error caused by duplicate contract names in Truffle.
73
-
74
- ## 1.4.2 (2020-12-16)
75
-
76
- - Fix an error in the `unsafeAllowCustomTypes` flag that would cause other storage layout incompatibilities to be ignored. ([#259](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/259))
77
-
78
- Users of this flag are advised to update to this version.
79
-
80
- ## 1.4.1 (2020-11-30)
81
-
82
- - Fix a problem in deployment logic when used with Hyperledger Besu. ([#244](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/244))
83
-
84
- ## 1.4.0 (2020-11-24)
85
-
86
- - Add `silenceWarnings` to emit a single warning and silence all subsequent ones. ([#228](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/228))
87
-
88
- ## 1.3.1 (2020-11-13)
89
-
90
- - Add missing artifact files in the package.
91
-
92
- ## 1.3.0 (2020-11-13)
93
-
94
- - Support Hardhat. ([#214](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/214))
95
-
96
- ## 1.2.0 (2020-10-16)
97
-
98
- - Support new flag `unsafeAllowLinkedLibraries` to allow deployment of contracts with linked libraries. ([#182](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/182))
99
-
100
- ## 1.1.1 (2020-10-08)
101
-
102
- - Fix OpenZeppelin CLI migration for projects that were initialized with ZeppelinOS. ([#193](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/193))
103
-
104
- ## 1.1.0 (2020-09-18)
105
-
106
- - Add ability to migrate from OpenZeppelin CLI. ([#143](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/143))
107
-
108
- ## 1.0.2 (2020-09-16)
109
-
110
- - Fix false positive variable initialization check in Solidity 0.7.1. ([#171](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/171))
111
-
112
- ## 1.0.1 (2020-09-01)
113
-
114
- - Include `src` directory in npm packages. ([#150](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/150))
@@ -1,5 +0,0 @@
1
- import { EthereumProvider } from './provider';
2
- import { ValidationOptions } from './validate';
3
- import { ProxyDeployment } from './manifest';
4
- export declare function setProxyKind(provider: EthereumProvider, proxyAddress: string, opts: ValidationOptions): Promise<ProxyDeployment['kind']>;
5
- //# sourceMappingURL=set-proxy-kind.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set-proxy-kind.d.ts","sourceRoot":"","sources":["../src/set-proxy-kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAgC,eAAe,EAAE,MAAM,YAAY,CAAC;AAE3E,wBAAsB,YAAY,CAChC,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAkBlC"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setProxyKind = void 0;
4
- const manifest_1 = require("./manifest");
5
- async function setProxyKind(provider, proxyAddress, opts) {
6
- var _a;
7
- const manifest = await manifest_1.Manifest.forNetwork(provider);
8
- const manifestDeployment = await manifest.getProxyFromAddress(proxyAddress).catch(e => {
9
- if (e instanceof manifest_1.DeploymentNotFound) {
10
- return undefined;
11
- }
12
- else {
13
- throw e;
14
- }
15
- });
16
- if (opts.kind === undefined) {
17
- opts.kind = (_a = manifestDeployment === null || manifestDeployment === void 0 ? void 0 : manifestDeployment.kind) !== null && _a !== void 0 ? _a : 'transparent';
18
- }
19
- else if (manifestDeployment && opts.kind !== manifestDeployment.kind) {
20
- throw new Error(`Requested an upgrade of kind ${opts.kind} but proxy is ${manifestDeployment.kind}`);
21
- }
22
- return opts.kind;
23
- }
24
- exports.setProxyKind = setProxyKind;
25
- //# sourceMappingURL=set-proxy-kind.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set-proxy-kind.js","sourceRoot":"","sources":["../src/set-proxy-kind.ts"],"names":[],"mappings":";;;AAEA,yCAA2E;AAEpE,KAAK,UAAU,YAAY,CAChC,QAA0B,EAC1B,YAAoB,EACpB,IAAuB;;IAEvB,MAAM,QAAQ,GAAG,MAAM,mBAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAErD,MAAM,kBAAkB,GAAG,MAAM,QAAQ,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACpF,IAAI,CAAC,YAAY,6BAAkB,EAAE;YACnC,OAAO,SAAS,CAAC;SAClB;aAAM;YACL,MAAM,CAAC,CAAC;SACT;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;QAC3B,IAAI,CAAC,IAAI,GAAG,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,IAAI,mCAAI,aAAa,CAAC;KACvD;SAAM,IAAI,kBAAkB,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,CAAC,IAAI,EAAE;QACtE,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,CAAC,IAAI,iBAAiB,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC;KACtG;IAED,OAAO,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAtBD,oCAsBC"}
@@ -1,27 +0,0 @@
1
- import { EthereumProvider } from './provider';
2
- import { ValidationOptions } from './validate';
3
- import { Manifest, DeploymentNotFound, ProxyDeployment } from './manifest';
4
-
5
- export async function setProxyKind(
6
- provider: EthereumProvider,
7
- proxyAddress: string,
8
- opts: ValidationOptions,
9
- ): Promise<ProxyDeployment['kind']> {
10
- const manifest = await Manifest.forNetwork(provider);
11
-
12
- const manifestDeployment = await manifest.getProxyFromAddress(proxyAddress).catch(e => {
13
- if (e instanceof DeploymentNotFound) {
14
- return undefined;
15
- } else {
16
- throw e;
17
- }
18
- });
19
-
20
- if (opts.kind === undefined) {
21
- opts.kind = manifestDeployment?.kind ?? 'transparent';
22
- } else if (manifestDeployment && opts.kind !== manifestDeployment.kind) {
23
- throw new Error(`Requested an upgrade of kind ${opts.kind} but proxy is ${manifestDeployment.kind}`);
24
- }
25
-
26
- return opts.kind;
27
- }