cdktn 0.25.0-pre.26 → 0.25.0-pre.28
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/.jsii +323 -28
- package/lib/annotations.js +1 -1
- package/lib/app.js +1 -1
- package/lib/aspect.js +1 -1
- package/lib/asset-hash.js +1 -1
- package/lib/asset-staging.d.ts +83 -0
- package/lib/asset-staging.js +195 -0
- package/lib/assets.d.ts +12 -0
- package/lib/assets.js +5 -2
- package/lib/backends/azurerm-backend.js +2 -2
- package/lib/backends/cloud-backend.js +4 -4
- package/lib/backends/consul-backend.js +2 -2
- package/lib/backends/cos-backend.js +2 -2
- package/lib/backends/gcs-backend.js +2 -2
- package/lib/backends/http-backend.js +2 -2
- package/lib/backends/local-backend.js +2 -2
- package/lib/backends/oss-backend.js +2 -2
- package/lib/backends/pg-backend.js +2 -2
- package/lib/backends/remote-backend.js +4 -4
- package/lib/backends/s3-backend.js +2 -2
- package/lib/backends/swift-backend.js +2 -2
- package/lib/complex-computed-list.js +26 -26
- package/lib/errors.d.ts +1 -1
- package/lib/errors.js +5 -5
- package/lib/functions/provider-function.js +1 -1
- package/lib/functions/terraform-functions.generated.js +1 -1
- package/lib/ignore-strategy.js +1 -1
- package/lib/importable-resource.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/manifest.js +1 -1
- package/lib/resource.js +1 -1
- package/lib/terraform-asset.d.ts +20 -14
- package/lib/terraform-asset.js +15 -40
- package/lib/terraform-backend.js +1 -1
- package/lib/terraform-count.js +1 -1
- package/lib/terraform-data-resource.js +1 -1
- package/lib/terraform-data-source.js +1 -1
- package/lib/terraform-element.js +1 -1
- package/lib/terraform-ephemeral-resource.js +1 -1
- package/lib/terraform-functions.js +1 -1
- package/lib/terraform-hcl-module.js +1 -1
- package/lib/terraform-iterator.js +5 -5
- package/lib/terraform-local.js +1 -1
- package/lib/terraform-module.js +1 -1
- package/lib/terraform-operators.js +1 -1
- package/lib/terraform-output.js +1 -1
- package/lib/terraform-provider.js +1 -1
- package/lib/terraform-provisioner.js +1 -1
- package/lib/terraform-remote-state.js +1 -1
- package/lib/terraform-resource-targets.js +1 -1
- package/lib/terraform-resource.js +1 -1
- package/lib/terraform-stack.js +1 -1
- package/lib/terraform-variable.js +2 -2
- package/lib/testing/index.js +1 -1
- package/lib/testing/matchers.js +1 -1
- package/lib/tokens/lazy.js +2 -2
- package/lib/tokens/resolvable.js +2 -2
- package/lib/tokens/string-fragments.js +1 -1
- package/lib/tokens/token.js +2 -2
- package/lib/upgrade-id-aspect.js +1 -1
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -1651,7 +1651,7 @@
|
|
|
1651
1651
|
"kind": "class",
|
|
1652
1652
|
"locationInModule": {
|
|
1653
1653
|
"filename": "src/assets.ts",
|
|
1654
|
-
"line":
|
|
1654
|
+
"line": 209
|
|
1655
1655
|
},
|
|
1656
1656
|
"name": "AssetPackaging",
|
|
1657
1657
|
"properties": [
|
|
@@ -1664,7 +1664,7 @@
|
|
|
1664
1664
|
"immutable": true,
|
|
1665
1665
|
"locationInModule": {
|
|
1666
1666
|
"filename": "src/assets.ts",
|
|
1667
|
-
"line":
|
|
1667
|
+
"line": 218
|
|
1668
1668
|
},
|
|
1669
1669
|
"name": "DIRECTORY",
|
|
1670
1670
|
"static": true,
|
|
@@ -1681,7 +1681,7 @@
|
|
|
1681
1681
|
"immutable": true,
|
|
1682
1682
|
"locationInModule": {
|
|
1683
1683
|
"filename": "src/assets.ts",
|
|
1684
|
-
"line":
|
|
1684
|
+
"line": 213
|
|
1685
1685
|
},
|
|
1686
1686
|
"name": "FILE",
|
|
1687
1687
|
"static": true,
|
|
@@ -1698,7 +1698,7 @@
|
|
|
1698
1698
|
"immutable": true,
|
|
1699
1699
|
"locationInModule": {
|
|
1700
1700
|
"filename": "src/assets.ts",
|
|
1701
|
-
"line":
|
|
1701
|
+
"line": 223
|
|
1702
1702
|
},
|
|
1703
1703
|
"name": "ZIP",
|
|
1704
1704
|
"static": true,
|
|
@@ -1709,6 +1709,242 @@
|
|
|
1709
1709
|
],
|
|
1710
1710
|
"symbolId": "src/assets:AssetPackaging"
|
|
1711
1711
|
},
|
|
1712
|
+
"cdktn.AssetStaging": {
|
|
1713
|
+
"assembly": "cdktn",
|
|
1714
|
+
"base": "constructs.Construct",
|
|
1715
|
+
"docs": {
|
|
1716
|
+
"remarks": "Hashing happens eagerly in the constructor; staging the content to\n`targetPath` only happens when `stage()` is called, which callers do from\ntheir own `onSynthesize` hook. This keeps the filesystem side effect in the\none window where it is safe to run, and keeps this class skippable once a\nbundler is introduced.\n\n`SOURCE` and `OUTPUT` compute identically here: without a bundler, the\n\"output\" of an asset is its source verbatim. A future bundler changes what\n`OUTPUT` hashes, not this class.\n\nThe source-tree walk behind `SOURCE`/`OUTPUT` is cached per synth (see\n{@link hashCachesByRoot}), so referencing the same asset from more than one\nresource or stack hashes it once. `ASSET_HASH_SALT_CONTEXT_KEY` folds an\napp-wide value into every computed hash, for bulk cache-busting across an\nentire tree rather than one asset's `extraHash`.",
|
|
1717
|
+
"stability": "experimental",
|
|
1718
|
+
"summary": "Resolves an asset's identity (`SOURCE`/`OUTPUT`/`CUSTOM` hashing, with `exclude`/`extraHash`) and stages it to disk."
|
|
1719
|
+
},
|
|
1720
|
+
"fqn": "cdktn.AssetStaging",
|
|
1721
|
+
"initializer": {
|
|
1722
|
+
"docs": {
|
|
1723
|
+
"stability": "experimental"
|
|
1724
|
+
},
|
|
1725
|
+
"locationInModule": {
|
|
1726
|
+
"filename": "src/asset-staging.ts",
|
|
1727
|
+
"line": 125
|
|
1728
|
+
},
|
|
1729
|
+
"parameters": [
|
|
1730
|
+
{
|
|
1731
|
+
"name": "scope",
|
|
1732
|
+
"type": {
|
|
1733
|
+
"fqn": "constructs.Construct"
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"name": "id",
|
|
1738
|
+
"type": {
|
|
1739
|
+
"primitive": "string"
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"name": "props",
|
|
1744
|
+
"type": {
|
|
1745
|
+
"fqn": "cdktn.AssetStagingOptions"
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
]
|
|
1749
|
+
},
|
|
1750
|
+
"interfaces": [
|
|
1751
|
+
"cdktn.IAsset"
|
|
1752
|
+
],
|
|
1753
|
+
"kind": "class",
|
|
1754
|
+
"locationInModule": {
|
|
1755
|
+
"filename": "src/asset-staging.ts",
|
|
1756
|
+
"line": 116
|
|
1757
|
+
},
|
|
1758
|
+
"methods": [
|
|
1759
|
+
{
|
|
1760
|
+
"docs": {
|
|
1761
|
+
"remarks": "Called from the owning\nconstruct's `onSynthesize` hook, once the target path is known.",
|
|
1762
|
+
"stability": "experimental",
|
|
1763
|
+
"summary": "Write the staged content to `targetPath`."
|
|
1764
|
+
},
|
|
1765
|
+
"locationInModule": {
|
|
1766
|
+
"filename": "src/asset-staging.ts",
|
|
1767
|
+
"line": 219
|
|
1768
|
+
},
|
|
1769
|
+
"name": "stage",
|
|
1770
|
+
"parameters": [
|
|
1771
|
+
{
|
|
1772
|
+
"docs": {
|
|
1773
|
+
"summary": "- path the packaged result should be written to."
|
|
1774
|
+
},
|
|
1775
|
+
"name": "targetPath",
|
|
1776
|
+
"type": {
|
|
1777
|
+
"primitive": "string"
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
]
|
|
1781
|
+
}
|
|
1782
|
+
],
|
|
1783
|
+
"name": "AssetStaging",
|
|
1784
|
+
"properties": [
|
|
1785
|
+
{
|
|
1786
|
+
"docs": {
|
|
1787
|
+
"remarks": "As this is a plain string, it\ncan be used in construct IDs in order to enforce creation of a new resource when the content\nhash has changed.",
|
|
1788
|
+
"stability": "experimental",
|
|
1789
|
+
"summary": "A hash of this asset, which is available at construction time."
|
|
1790
|
+
},
|
|
1791
|
+
"immutable": true,
|
|
1792
|
+
"locationInModule": {
|
|
1793
|
+
"filename": "src/asset-staging.ts",
|
|
1794
|
+
"line": 123
|
|
1795
|
+
},
|
|
1796
|
+
"name": "assetHash",
|
|
1797
|
+
"overrides": "cdktn.IAsset",
|
|
1798
|
+
"type": {
|
|
1799
|
+
"primitive": "string"
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
"docs": {
|
|
1804
|
+
"stability": "experimental"
|
|
1805
|
+
},
|
|
1806
|
+
"immutable": true,
|
|
1807
|
+
"locationInModule": {
|
|
1808
|
+
"filename": "src/asset-staging.ts",
|
|
1809
|
+
"line": 122
|
|
1810
|
+
},
|
|
1811
|
+
"name": "isDirectory",
|
|
1812
|
+
"type": {
|
|
1813
|
+
"primitive": "boolean"
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"docs": {
|
|
1818
|
+
"stability": "experimental"
|
|
1819
|
+
},
|
|
1820
|
+
"immutable": true,
|
|
1821
|
+
"locationInModule": {
|
|
1822
|
+
"filename": "src/asset-staging.ts",
|
|
1823
|
+
"line": 121
|
|
1824
|
+
},
|
|
1825
|
+
"name": "packaging",
|
|
1826
|
+
"type": {
|
|
1827
|
+
"fqn": "cdktn.IAssetPackaging"
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
],
|
|
1831
|
+
"symbolId": "src/asset-staging:AssetStaging"
|
|
1832
|
+
},
|
|
1833
|
+
"cdktn.AssetStagingOptions": {
|
|
1834
|
+
"assembly": "cdktn",
|
|
1835
|
+
"datatype": true,
|
|
1836
|
+
"docs": {
|
|
1837
|
+
"stability": "experimental",
|
|
1838
|
+
"summary": "Options for {@link AssetStaging}."
|
|
1839
|
+
},
|
|
1840
|
+
"fqn": "cdktn.AssetStagingOptions",
|
|
1841
|
+
"interfaces": [
|
|
1842
|
+
"cdktn.AssetOptions"
|
|
1843
|
+
],
|
|
1844
|
+
"kind": "interface",
|
|
1845
|
+
"locationInModule": {
|
|
1846
|
+
"filename": "src/asset-staging.ts",
|
|
1847
|
+
"line": 56
|
|
1848
|
+
},
|
|
1849
|
+
"name": "AssetStagingOptions",
|
|
1850
|
+
"properties": [
|
|
1851
|
+
{
|
|
1852
|
+
"abstract": true,
|
|
1853
|
+
"docs": {
|
|
1854
|
+
"remarks": "The caller decides this\n(e.g. from its own `AssetType`) — `AssetStaging` never infers or changes\nit based on `exclude`/`extraHash`.",
|
|
1855
|
+
"stability": "experimental",
|
|
1856
|
+
"summary": "How the staged result is produced and shaped."
|
|
1857
|
+
},
|
|
1858
|
+
"immutable": true,
|
|
1859
|
+
"locationInModule": {
|
|
1860
|
+
"filename": "src/asset-staging.ts",
|
|
1861
|
+
"line": 68
|
|
1862
|
+
},
|
|
1863
|
+
"name": "packaging",
|
|
1864
|
+
"type": {
|
|
1865
|
+
"fqn": "cdktn.IAssetPackaging"
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
"abstract": true,
|
|
1870
|
+
"docs": {
|
|
1871
|
+
"remarks": "Resolving a relative path\nagainst `cdktf.json` is the caller's responsibility.",
|
|
1872
|
+
"stability": "experimental",
|
|
1873
|
+
"summary": "Absolute path to the source file or directory."
|
|
1874
|
+
},
|
|
1875
|
+
"immutable": true,
|
|
1876
|
+
"locationInModule": {
|
|
1877
|
+
"filename": "src/asset-staging.ts",
|
|
1878
|
+
"line": 61
|
|
1879
|
+
},
|
|
1880
|
+
"name": "sourcePath",
|
|
1881
|
+
"type": {
|
|
1882
|
+
"primitive": "string"
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"abstract": true,
|
|
1887
|
+
"docs": {
|
|
1888
|
+
"default": "- nothing is excluded",
|
|
1889
|
+
"remarks": "Cannot be combined with\n`ignoreStrategy`, which replaces this matcher rather than layering on\ntop of it.",
|
|
1890
|
+
"stability": "experimental",
|
|
1891
|
+
"summary": "Paths to exclude, relative to `sourcePath`."
|
|
1892
|
+
},
|
|
1893
|
+
"immutable": true,
|
|
1894
|
+
"locationInModule": {
|
|
1895
|
+
"filename": "src/asset-staging.ts",
|
|
1896
|
+
"line": 77
|
|
1897
|
+
},
|
|
1898
|
+
"name": "exclude",
|
|
1899
|
+
"optional": true,
|
|
1900
|
+
"type": {
|
|
1901
|
+
"collection": {
|
|
1902
|
+
"elementtype": {
|
|
1903
|
+
"primitive": "string"
|
|
1904
|
+
},
|
|
1905
|
+
"kind": "array"
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
"abstract": true,
|
|
1911
|
+
"docs": {
|
|
1912
|
+
"default": "- no extra hash",
|
|
1913
|
+
"stability": "experimental",
|
|
1914
|
+
"summary": "Extra information to fold into the hash (e.g. build instructions and other inputs)."
|
|
1915
|
+
},
|
|
1916
|
+
"immutable": true,
|
|
1917
|
+
"locationInModule": {
|
|
1918
|
+
"filename": "src/asset-staging.ts",
|
|
1919
|
+
"line": 93
|
|
1920
|
+
},
|
|
1921
|
+
"name": "extraHash",
|
|
1922
|
+
"optional": true,
|
|
1923
|
+
"type": {
|
|
1924
|
+
"primitive": "string"
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
"abstract": true,
|
|
1929
|
+
"docs": {
|
|
1930
|
+
"default": "- `exclude` is used with the built-in matcher",
|
|
1931
|
+
"stability": "experimental",
|
|
1932
|
+
"summary": "Exclusion matching, for callers that need `.gitignore` / `.dockerignore` parity rather than the built-in exact-path / suffix / directory matcher."
|
|
1933
|
+
},
|
|
1934
|
+
"immutable": true,
|
|
1935
|
+
"locationInModule": {
|
|
1936
|
+
"filename": "src/asset-staging.ts",
|
|
1937
|
+
"line": 85
|
|
1938
|
+
},
|
|
1939
|
+
"name": "ignoreStrategy",
|
|
1940
|
+
"optional": true,
|
|
1941
|
+
"type": {
|
|
1942
|
+
"fqn": "cdktn.IIgnoreStrategy"
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
],
|
|
1946
|
+
"symbolId": "src/asset-staging:AssetStagingOptions"
|
|
1947
|
+
},
|
|
1712
1948
|
"cdktn.AssetType": {
|
|
1713
1949
|
"assembly": "cdktn",
|
|
1714
1950
|
"docs": {
|
|
@@ -1718,7 +1954,7 @@
|
|
|
1718
1954
|
"kind": "enum",
|
|
1719
1955
|
"locationInModule": {
|
|
1720
1956
|
"filename": "src/terraform-asset.ts",
|
|
1721
|
-
"line":
|
|
1957
|
+
"line": 63
|
|
1722
1958
|
},
|
|
1723
1959
|
"members": [
|
|
1724
1960
|
{
|
|
@@ -11866,7 +12102,7 @@
|
|
|
11866
12102
|
},
|
|
11867
12103
|
"locationInModule": {
|
|
11868
12104
|
"filename": "src/assets.ts",
|
|
11869
|
-
"line":
|
|
12105
|
+
"line": 123
|
|
11870
12106
|
},
|
|
11871
12107
|
"name": "pack",
|
|
11872
12108
|
"parameters": [
|
|
@@ -11900,6 +12136,23 @@
|
|
|
11900
12136
|
"primitive": "string"
|
|
11901
12137
|
}
|
|
11902
12138
|
},
|
|
12139
|
+
{
|
|
12140
|
+
"abstract": true,
|
|
12141
|
+
"docs": {
|
|
12142
|
+
"remarks": "`hashPath`'s `archive` frame\nmust agree with this or the hash and the artifact describe different\nfile sets.\n\n`ZipPackaging` sets this because `archiveSync` never emits ZIP directory\nentries. A directory-producing packaging that mirrors the source tree\n(e.g. `DirectoryPackaging`) leaves this false, since its directories are\nreal entries on disk.",
|
|
12143
|
+
"stability": "experimental",
|
|
12144
|
+
"summary": "Whether `pack` emits an artifact with no directory entries of its own — only the ignore-strategy-aware source walk."
|
|
12145
|
+
},
|
|
12146
|
+
"immutable": true,
|
|
12147
|
+
"locationInModule": {
|
|
12148
|
+
"filename": "src/assets.ts",
|
|
12149
|
+
"line": 116
|
|
12150
|
+
},
|
|
12151
|
+
"name": "omitsDirectoryEntries",
|
|
12152
|
+
"type": {
|
|
12153
|
+
"primitive": "boolean"
|
|
12154
|
+
}
|
|
12155
|
+
},
|
|
11903
12156
|
{
|
|
11904
12157
|
"abstract": true,
|
|
11905
12158
|
"docs": {
|
|
@@ -17040,7 +17293,7 @@
|
|
|
17040
17293
|
"kind": "interface",
|
|
17041
17294
|
"locationInModule": {
|
|
17042
17295
|
"filename": "src/assets.ts",
|
|
17043
|
-
"line":
|
|
17296
|
+
"line": 133
|
|
17044
17297
|
},
|
|
17045
17298
|
"name": "PackOptions",
|
|
17046
17299
|
"properties": [
|
|
@@ -17053,7 +17306,7 @@
|
|
|
17053
17306
|
"immutable": true,
|
|
17054
17307
|
"locationInModule": {
|
|
17055
17308
|
"filename": "src/assets.ts",
|
|
17056
|
-
"line":
|
|
17309
|
+
"line": 137
|
|
17057
17310
|
},
|
|
17058
17311
|
"name": "source",
|
|
17059
17312
|
"type": {
|
|
@@ -17069,7 +17322,7 @@
|
|
|
17069
17322
|
"immutable": true,
|
|
17070
17323
|
"locationInModule": {
|
|
17071
17324
|
"filename": "src/assets.ts",
|
|
17072
|
-
"line":
|
|
17325
|
+
"line": 142
|
|
17073
17326
|
},
|
|
17074
17327
|
"name": "target",
|
|
17075
17328
|
"type": {
|
|
@@ -17087,7 +17340,7 @@
|
|
|
17087
17340
|
"immutable": true,
|
|
17088
17341
|
"locationInModule": {
|
|
17089
17342
|
"filename": "src/assets.ts",
|
|
17090
|
-
"line":
|
|
17343
|
+
"line": 151
|
|
17091
17344
|
},
|
|
17092
17345
|
"name": "ignoreStrategy",
|
|
17093
17346
|
"optional": true,
|
|
@@ -20206,7 +20459,7 @@
|
|
|
20206
20459
|
"kind": "interface",
|
|
20207
20460
|
"locationInModule": {
|
|
20208
20461
|
"filename": "src/assets.ts",
|
|
20209
|
-
"line":
|
|
20462
|
+
"line": 236
|
|
20210
20463
|
},
|
|
20211
20464
|
"name": "StagedAsset",
|
|
20212
20465
|
"properties": [
|
|
@@ -20220,7 +20473,7 @@
|
|
|
20220
20473
|
"immutable": true,
|
|
20221
20474
|
"locationInModule": {
|
|
20222
20475
|
"filename": "src/assets.ts",
|
|
20223
|
-
"line":
|
|
20476
|
+
"line": 242
|
|
20224
20477
|
},
|
|
20225
20478
|
"name": "assetHash",
|
|
20226
20479
|
"type": {
|
|
@@ -20237,7 +20490,7 @@
|
|
|
20237
20490
|
"immutable": true,
|
|
20238
20491
|
"locationInModule": {
|
|
20239
20492
|
"filename": "src/assets.ts",
|
|
20240
|
-
"line":
|
|
20493
|
+
"line": 255
|
|
20241
20494
|
},
|
|
20242
20495
|
"name": "isDirectory",
|
|
20243
20496
|
"type": {
|
|
@@ -20253,7 +20506,7 @@
|
|
|
20253
20506
|
"immutable": true,
|
|
20254
20507
|
"locationInModule": {
|
|
20255
20508
|
"filename": "src/assets.ts",
|
|
20256
|
-
"line":
|
|
20509
|
+
"line": 247
|
|
20257
20510
|
},
|
|
20258
20511
|
"name": "path",
|
|
20259
20512
|
"type": {
|
|
@@ -21738,7 +21991,7 @@
|
|
|
21738
21991
|
},
|
|
21739
21992
|
"locationInModule": {
|
|
21740
21993
|
"filename": "src/terraform-asset.ts",
|
|
21741
|
-
"line":
|
|
21994
|
+
"line": 104
|
|
21742
21995
|
},
|
|
21743
21996
|
"parameters": [
|
|
21744
21997
|
{
|
|
@@ -21767,7 +22020,7 @@
|
|
|
21767
22020
|
"kind": "class",
|
|
21768
22021
|
"locationInModule": {
|
|
21769
22022
|
"filename": "src/terraform-asset.ts",
|
|
21770
|
-
"line":
|
|
22023
|
+
"line": 87
|
|
21771
22024
|
},
|
|
21772
22025
|
"name": "TerraformAsset",
|
|
21773
22026
|
"properties": [
|
|
@@ -21780,7 +22033,7 @@
|
|
|
21780
22033
|
"immutable": true,
|
|
21781
22034
|
"locationInModule": {
|
|
21782
22035
|
"filename": "src/terraform-asset.ts",
|
|
21783
|
-
"line":
|
|
22036
|
+
"line": 91
|
|
21784
22037
|
},
|
|
21785
22038
|
"name": "assetHash",
|
|
21786
22039
|
"overrides": "cdktn.IAsset",
|
|
@@ -21796,7 +22049,7 @@
|
|
|
21796
22049
|
"immutable": true,
|
|
21797
22050
|
"locationInModule": {
|
|
21798
22051
|
"filename": "src/terraform-asset.ts",
|
|
21799
|
-
"line":
|
|
22052
|
+
"line": 191
|
|
21800
22053
|
},
|
|
21801
22054
|
"name": "fileName",
|
|
21802
22055
|
"type": {
|
|
@@ -21811,7 +22064,7 @@
|
|
|
21811
22064
|
"immutable": true,
|
|
21812
22065
|
"locationInModule": {
|
|
21813
22066
|
"filename": "src/terraform-asset.ts",
|
|
21814
|
-
"line":
|
|
22067
|
+
"line": 178
|
|
21815
22068
|
},
|
|
21816
22069
|
"name": "path",
|
|
21817
22070
|
"type": {
|
|
@@ -21824,7 +22077,7 @@
|
|
|
21824
22077
|
},
|
|
21825
22078
|
"locationInModule": {
|
|
21826
22079
|
"filename": "src/terraform-asset.ts",
|
|
21827
|
-
"line":
|
|
22080
|
+
"line": 93
|
|
21828
22081
|
},
|
|
21829
22082
|
"name": "type",
|
|
21830
22083
|
"type": {
|
|
@@ -21844,7 +22097,7 @@
|
|
|
21844
22097
|
"kind": "interface",
|
|
21845
22098
|
"locationInModule": {
|
|
21846
22099
|
"filename": "src/terraform-asset.ts",
|
|
21847
|
-
"line":
|
|
22100
|
+
"line": 23
|
|
21848
22101
|
},
|
|
21849
22102
|
"name": "TerraformAssetConfig",
|
|
21850
22103
|
"properties": [
|
|
@@ -21856,7 +22109,7 @@
|
|
|
21856
22109
|
"immutable": true,
|
|
21857
22110
|
"locationInModule": {
|
|
21858
22111
|
"filename": "src/terraform-asset.ts",
|
|
21859
|
-
"line":
|
|
22112
|
+
"line": 25
|
|
21860
22113
|
},
|
|
21861
22114
|
"name": "path",
|
|
21862
22115
|
"type": {
|
|
@@ -21871,7 +22124,7 @@
|
|
|
21871
22124
|
"immutable": true,
|
|
21872
22125
|
"locationInModule": {
|
|
21873
22126
|
"filename": "src/terraform-asset.ts",
|
|
21874
|
-
"line":
|
|
22127
|
+
"line": 29
|
|
21875
22128
|
},
|
|
21876
22129
|
"name": "assetHash",
|
|
21877
22130
|
"optional": true,
|
|
@@ -21883,14 +22136,14 @@
|
|
|
21883
22136
|
"abstract": true,
|
|
21884
22137
|
"docs": {
|
|
21885
22138
|
"default": "AssetHashType.SOURCE",
|
|
21886
|
-
"remarks": "`SOURCE` (the default) hashes the source path. `CUSTOM` uses the\n`assetHash` value verbatim and requires it to be set. `OUTPUT`
|
|
22139
|
+
"remarks": "`SOURCE` (the default) hashes the source path. `CUSTOM` uses the\n`assetHash` value verbatim and requires it to be set. `OUTPUT` also\nhashes the source path today — there is no bundling step yet, so the\n\"output\" of an asset is its source verbatim — but will hash the\nbundler's output once bundling is introduced.\n\nIf `assetHash` is set, this must be `undefined` or `AssetHashType.CUSTOM`.",
|
|
21887
22140
|
"stability": "experimental",
|
|
21888
22141
|
"summary": "How the `assetHash` is derived."
|
|
21889
22142
|
},
|
|
21890
22143
|
"immutable": true,
|
|
21891
22144
|
"locationInModule": {
|
|
21892
22145
|
"filename": "src/terraform-asset.ts",
|
|
21893
|
-
"line":
|
|
22146
|
+
"line": 43
|
|
21894
22147
|
},
|
|
21895
22148
|
"name": "assetHashType",
|
|
21896
22149
|
"optional": true,
|
|
@@ -21898,6 +22151,48 @@
|
|
|
21898
22151
|
"fqn": "cdktn.AssetHashType"
|
|
21899
22152
|
}
|
|
21900
22153
|
},
|
|
22154
|
+
{
|
|
22155
|
+
"abstract": true,
|
|
22156
|
+
"docs": {
|
|
22157
|
+
"default": "- nothing is excluded",
|
|
22158
|
+
"remarks": "See\n`AssetStagingOptions.exclude` for the accepted forms. Both the computed\nhash and the staged/packed content honor the exclusion.",
|
|
22159
|
+
"stability": "experimental",
|
|
22160
|
+
"summary": "Paths to exclude from the asset, relative to `path`."
|
|
22161
|
+
},
|
|
22162
|
+
"immutable": true,
|
|
22163
|
+
"locationInModule": {
|
|
22164
|
+
"filename": "src/terraform-asset.ts",
|
|
22165
|
+
"line": 52
|
|
22166
|
+
},
|
|
22167
|
+
"name": "exclude",
|
|
22168
|
+
"optional": true,
|
|
22169
|
+
"type": {
|
|
22170
|
+
"collection": {
|
|
22171
|
+
"elementtype": {
|
|
22172
|
+
"primitive": "string"
|
|
22173
|
+
},
|
|
22174
|
+
"kind": "array"
|
|
22175
|
+
}
|
|
22176
|
+
}
|
|
22177
|
+
},
|
|
22178
|
+
{
|
|
22179
|
+
"abstract": true,
|
|
22180
|
+
"docs": {
|
|
22181
|
+
"default": "- no extra hash",
|
|
22182
|
+
"stability": "experimental",
|
|
22183
|
+
"summary": "Extra information to fold into the hash (e.g. build instructions and other inputs)."
|
|
22184
|
+
},
|
|
22185
|
+
"immutable": true,
|
|
22186
|
+
"locationInModule": {
|
|
22187
|
+
"filename": "src/terraform-asset.ts",
|
|
22188
|
+
"line": 60
|
|
22189
|
+
},
|
|
22190
|
+
"name": "extraHash",
|
|
22191
|
+
"optional": true,
|
|
22192
|
+
"type": {
|
|
22193
|
+
"primitive": "string"
|
|
22194
|
+
}
|
|
22195
|
+
},
|
|
21901
22196
|
{
|
|
21902
22197
|
"abstract": true,
|
|
21903
22198
|
"docs": {
|
|
@@ -21906,7 +22201,7 @@
|
|
|
21906
22201
|
"immutable": true,
|
|
21907
22202
|
"locationInModule": {
|
|
21908
22203
|
"filename": "src/terraform-asset.ts",
|
|
21909
|
-
"line":
|
|
22204
|
+
"line": 27
|
|
21910
22205
|
},
|
|
21911
22206
|
"name": "type",
|
|
21912
22207
|
"optional": true,
|
|
@@ -31780,6 +32075,6 @@
|
|
|
31780
32075
|
"symbolId": "src/testing/matchers:TerraformConstructor"
|
|
31781
32076
|
}
|
|
31782
32077
|
},
|
|
31783
|
-
"version": "0.25.0-pre.
|
|
31784
|
-
"fingerprint": "
|
|
32078
|
+
"version": "0.25.0-pre.28",
|
|
32079
|
+
"fingerprint": "8F6kUDC80Mk1XFsHM4hivho6OoXcWa8912NpmyqZuW0="
|
|
31785
32080
|
}
|
package/lib/annotations.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.DISABLE_STACK_TRACE_IN_METADATA = "@cdktf/disable_stack_trace_in_metadat
|
|
|
14
14
|
*/
|
|
15
15
|
class Annotations {
|
|
16
16
|
scope;
|
|
17
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.Annotations", version: "0.25.0-pre.
|
|
17
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.Annotations", version: "0.25.0-pre.28" };
|
|
18
18
|
/**
|
|
19
19
|
* Returns the annotations API for a construct scope.
|
|
20
20
|
* @param scope The scope
|
package/lib/app.js
CHANGED
|
@@ -51,7 +51,7 @@ exports.CONTEXT_ENV = "CDKTF_CONTEXT_JSON";
|
|
|
51
51
|
* Represents a cdktn application.
|
|
52
52
|
*/
|
|
53
53
|
class App extends constructs_1.Construct {
|
|
54
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.App", version: "0.25.0-pre.
|
|
54
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.App", version: "0.25.0-pre.28" };
|
|
55
55
|
/**
|
|
56
56
|
* The output directory into which resources will be synthesized.
|
|
57
57
|
*/
|
package/lib/aspect.js
CHANGED
|
@@ -8,7 +8,7 @@ const ASPECTS_SYMBOL = Symbol("cdktf-aspects");
|
|
|
8
8
|
* synthesis.
|
|
9
9
|
*/
|
|
10
10
|
class Aspects {
|
|
11
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.Aspects", version: "0.25.0-pre.
|
|
11
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.Aspects", version: "0.25.0-pre.28" };
|
|
12
12
|
/**
|
|
13
13
|
* Returns the `Aspects` object associated with a construct scope.
|
|
14
14
|
* @param scope The scope for which these aspects will apply.
|
package/lib/asset-hash.js
CHANGED
|
@@ -51,7 +51,7 @@ const errors_1 = require("./errors");
|
|
|
51
51
|
* staged copy; this is the identity half without the staging half.
|
|
52
52
|
*/
|
|
53
53
|
class AssetHash {
|
|
54
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.AssetHash", version: "0.25.0-pre.
|
|
54
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdktn.AssetHash", version: "0.25.0-pre.28" };
|
|
55
55
|
/**
|
|
56
56
|
* Content hash of a file or directory, without staging it.
|
|
57
57
|
*
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { AssetOptions, IAsset, IAssetPackaging } from "./assets";
|
|
3
|
+
import { IIgnoreStrategy } from "./ignore-strategy";
|
|
4
|
+
/**
|
|
5
|
+
* Context key for a value folded into every computed asset hash in the
|
|
6
|
+
* construct tree, alongside `extraHash`. A bulk cache-busting escape hatch —
|
|
7
|
+
* `extraHash` is scoped to one asset, this is scoped to the whole app.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ASSET_HASH_SALT_CONTEXT_KEY = "cdktn:assetHashSalt";
|
|
10
|
+
/**
|
|
11
|
+
* Options for {@link AssetStaging}.
|
|
12
|
+
*/
|
|
13
|
+
export interface AssetStagingOptions extends AssetOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Absolute path to the source file or directory. Resolving a relative path
|
|
16
|
+
* against `cdktf.json` is the caller's responsibility.
|
|
17
|
+
*/
|
|
18
|
+
readonly sourcePath: string;
|
|
19
|
+
/**
|
|
20
|
+
* How the staged result is produced and shaped. The caller decides this
|
|
21
|
+
* (e.g. from its own `AssetType`) — `AssetStaging` never infers or changes
|
|
22
|
+
* it based on `exclude`/`extraHash`.
|
|
23
|
+
*/
|
|
24
|
+
readonly packaging: IAssetPackaging;
|
|
25
|
+
/**
|
|
26
|
+
* Paths to exclude, relative to `sourcePath`. Cannot be combined with
|
|
27
|
+
* `ignoreStrategy`, which replaces this matcher rather than layering on
|
|
28
|
+
* top of it.
|
|
29
|
+
*
|
|
30
|
+
* @default - nothing is excluded
|
|
31
|
+
*/
|
|
32
|
+
readonly exclude?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Exclusion matching, for callers that need `.gitignore` / `.dockerignore`
|
|
35
|
+
* parity rather than the built-in exact-path / suffix / directory matcher.
|
|
36
|
+
*
|
|
37
|
+
* @default - `exclude` is used with the built-in matcher
|
|
38
|
+
*/
|
|
39
|
+
readonly ignoreStrategy?: IIgnoreStrategy;
|
|
40
|
+
/**
|
|
41
|
+
* Extra information to fold into the hash (e.g. build instructions and
|
|
42
|
+
* other inputs).
|
|
43
|
+
*
|
|
44
|
+
* @default - no extra hash
|
|
45
|
+
*/
|
|
46
|
+
readonly extraHash?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Resolves an asset's identity (`SOURCE`/`OUTPUT`/`CUSTOM` hashing, with
|
|
50
|
+
* `exclude`/`extraHash`) and stages it to disk.
|
|
51
|
+
*
|
|
52
|
+
* Hashing happens eagerly in the constructor; staging the content to
|
|
53
|
+
* `targetPath` only happens when `stage()` is called, which callers do from
|
|
54
|
+
* their own `onSynthesize` hook. This keeps the filesystem side effect in the
|
|
55
|
+
* one window where it is safe to run, and keeps this class skippable once a
|
|
56
|
+
* bundler is introduced.
|
|
57
|
+
*
|
|
58
|
+
* `SOURCE` and `OUTPUT` compute identically here: without a bundler, the
|
|
59
|
+
* "output" of an asset is its source verbatim. A future bundler changes what
|
|
60
|
+
* `OUTPUT` hashes, not this class.
|
|
61
|
+
*
|
|
62
|
+
* The source-tree walk behind `SOURCE`/`OUTPUT` is cached per synth (see
|
|
63
|
+
* {@link hashCachesByRoot}), so referencing the same asset from more than one
|
|
64
|
+
* resource or stack hashes it once. `ASSET_HASH_SALT_CONTEXT_KEY` folds an
|
|
65
|
+
* app-wide value into every computed hash, for bulk cache-busting across an
|
|
66
|
+
* entire tree rather than one asset's `extraHash`.
|
|
67
|
+
*/
|
|
68
|
+
export declare class AssetStaging extends Construct implements IAsset {
|
|
69
|
+
private readonly sourcePath;
|
|
70
|
+
private readonly ignoreStrategy;
|
|
71
|
+
private readonly hashCache;
|
|
72
|
+
readonly packaging: IAssetPackaging;
|
|
73
|
+
readonly isDirectory: boolean;
|
|
74
|
+
readonly assetHash: string;
|
|
75
|
+
constructor(scope: Construct, id: string, props: AssetStagingOptions);
|
|
76
|
+
private resolveAssetHash;
|
|
77
|
+
/**
|
|
78
|
+
* Write the staged content to `targetPath`. Called from the owning
|
|
79
|
+
* construct's `onSynthesize` hook, once the target path is known.
|
|
80
|
+
* @param targetPath - path the packaged result should be written to
|
|
81
|
+
*/
|
|
82
|
+
stage(targetPath: string): void;
|
|
83
|
+
}
|