// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: / 1`] = ` ┣━ 📁 dotnet ┃ ┗━ 📁 Com.Acme.Foo ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┣━ 📁 Com ┃ ┃ ┗━ 📁 Acme ┃ ┃ ┗━ 📁 Foo ┃ ┃ ┗━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┣━ 📄 Com.Acme.Foo.csproj ┃ ┗━ 📄 foo-1.2.3.tgz ┣━ 📁 go ┃ ┗━ 📁 foo ┃ ┣━ 📄 go.mod ┃ ┣━ 📁 jsii ┃ ┃ ┣━ 📄 foo-1.2.3.tgz ┃ ┃ ┗━ 📄 jsii.go ┃ ┗━ 📄 version ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src ┃ ┗━ 📁 main ┃ ┣━ 📁 java ┃ ┃ ┗━ 📁 com ┃ ┃ ┗━ 📁 acme ┃ ┃ ┗━ 📁 foo ┃ ┃ ┗━ 📄 $Module.java ┃ ┗━ 📁 resources ┃ ┗━ 📁 com ┃ ┗━ 📁 acme ┃ ┗━ 📁 foo ┃ ┣━ 📄 $Module.txt ┃ ┗━ 📄 foo@1.2.3.jsii.tgz ┣━ 📁 js ┃ ┗━ 📄 foo@1.2.3.jsii.tgz ┗━ 📁 python ┣━ 📄 MANIFEST.in ┣━ 📄 pyproject.toml ┣━ 📄 README.md ┣━ 📄 setup.py ┗━ 📁 src ┗━ 📁 foo ┗━ 📁 _jsii ┣━ 📄 __init__.py ┗━ 📄 foo@1.2.3.jsii.tgz `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("foo", "1.2.3", "foo-1.2.3.tgz")] `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` Test assembly: foo Com.Acme.Foo UNLICENSED 1.2.3 Test en-US https://test.nope/foo foo.nope.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Com.Acme.Foo.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { new Com.Acme.Bar.Internal.DependencyResolution.Anchor(); } } } `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/foo-1.2.3.tgz 1`] = `dotnet/Com.Acme.Foo/foo-1.2.3.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/go.mod 1`] = ` module foo go 1.18 require ( github.com/aws/jsii-runtime-go v0.0.0 bar/v2 v2.0.0-rc.42 ) `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/jsii/foo-1.2.3.tgz 1`] = `go/foo/jsii/foo-1.2.3.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/jsii/jsii.go 1`] = ` // Package jsii contains the functionaility needed for jsii packages to // initialize their dependencies and themselves. Users should never need to use this package // directly. If you find you need to - please report a bug at // https://github.com/aws/jsii/issues/new/choose package jsii import ( bar "bar/v2/jsii" _ "embed" _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) //go:embed foo-1.2.3.tgz var tarball []byte // Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. // The implementation is idempotent (and hence safe to be called over and over). func Initialize() { // Ensure all dependencies are initialized bar.Initialize() // Load this library into the kernel _jsii_.Load("foo", "1.2.3", tarball) } `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/version 1`] = ` 1.2.3 `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/pom.xml 1`] = ` 4.0.0 \${project.groupId}:\${project.artifactId} Test assembly: foo https://test.nope/foo Test test scm:git:foo.nope.git foo.nope.git com.acme foo 1.2.3 jar UTF-8 com.acme bar [2.0.0-rc.42,3.0.0) software.amazon.jsii jsii-runtime [0.0.0-SNAPSHOT] org.jetbrains annotations [16.0.3,20.0.0) javax.annotation javax.annotation-api [1.3.2,1.4.0) compile org.apache.maven.plugins maven-compiler-plugin 3.11.0 1.8 1.8 true 4096m org.apache.maven.plugins maven-jar-plugin 3.3.0 true true true org.apache.maven.plugins maven-source-plugin 3.3.0 attach-sources jar org.apache.maven.plugins maven-javadoc-plugin 3.5.0 attach-javadocs jar false protected **/$Module.java -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 none true org.apache.maven.plugins maven-enforcer-plugin 3.3.0 enforce-maven enforce 3.6 org.codehaus.mojo versions-maven-plugin 2.16.0 false `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` package com.acme.foo; import static java.util.Arrays.asList; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.Reader; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.List; import java.util.Map; import software.amazon.jsii.JsiiModule; @software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); private static Map load() { final Map result = new HashMap<>(); final ClassLoader cl = $Module.class.getClassLoader(); try (final InputStream is = cl.getResourceAsStream("com/acme/foo/$Module.txt"); final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); final BufferedReader br = new BufferedReader(rd)) { br.lines() .filter(line -> !line.trim().isEmpty()) .forEach(line -> { final String[] parts = line.split("=", 2); final String fqn = parts[0]; final String className = parts[1]; result.put(fqn, className); }); } catch (final IOException exception) { throw new UncheckedIOException(exception); } return result; } private final Map> cache = new HashMap<>(); public $Module() { super("foo", "1.2.3", $Module.class, "foo@1.2.3.jsii.tgz"); } @Override public List> getDependencies() { return asList(com.acme.bar.$Module.class); } @Override protected Class resolveClass(final String fqn) throws ClassNotFoundException { if (!MODULE_TYPES.containsKey(fqn)) { throw new ClassNotFoundException("Unknown JSII type: " + fqn); } String className = MODULE_TYPES.get(fqn); if (!this.cache.containsKey(className)) { this.cache.put(className, this.findClass(className)); } return this.cache.get(className); } private Class findClass(final String binaryName) { try { return Class.forName(binaryName); } catch (final ClassNotFoundException exception) { throw new RuntimeException(exception); } } } `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /js/foo@1.2.3.jsii.tgz 1`] = `js/foo@1.2.3.jsii.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/MANIFEST.in 1`] = ` include pyproject.toml `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/README.md 1`] = ` foo === `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/pyproject.toml 1`] = ` [build-system] requires = ["setuptools~=67.3.2", "wheel~=0.40"] build-backend = "setuptools.build_meta" [tool.pyright] defineConstant = { DEBUG = true } pythonVersion = "3.7" pythonPlatform = "All" reportSelfClsParameterName = false `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/setup.py 1`] = ` import json import setuptools kwargs = json.loads( """ { "name": "foo", "version": "1.2.3", "description": "Test assembly: foo", "license": "UNLICENSED", "url": "https://test.nope/foo", "long_description_content_type": "text/markdown", "author": "Test", "bdist_wheel": { "universal": true }, "project_urls": { "Source": "foo.nope.git" }, "package_dir": { "": "src" }, "packages": [ "foo._jsii" ], "package_data": { "foo._jsii": [ "foo@1.2.3.jsii.tgz" ] }, "python_requires": "~=3.7", "install_requires": [ "bar>=2.0.0.rc42, <3.0.0", "jsii<0.0.1", "publication>=0.0.3", "typeguard~=2.13.3" ], "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Typing :: Typed" ], "scripts": [] } """ ) with open("README.md", encoding="utf8") as fp: kwargs["long_description"] = fp.read() setuptools.setup(**kwargs) `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/src/foo/_jsii/__init__.py 1`] = ` import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from typeguard import check_type import bar._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "foo", "1.2.3", __name__[0:-6], "foo@1.2.3.jsii.tgz" ) __all__ = [ "__jsii_assembly__", ] publication.publish() `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/src/foo/_jsii/foo@1.2.3.jsii.tgz 1`] = `python/src/foo/_jsii/foo@1.2.3.jsii.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: / 1`] = ` ┣━ 📁 dotnet ┃ ┗━ 📁 Com.Acme.Foo ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┣━ 📁 Com ┃ ┃ ┗━ 📁 Acme ┃ ┃ ┗━ 📁 Foo ┃ ┃ ┗━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┣━ 📄 Com.Acme.Foo.csproj ┃ ┗━ 📄 foo-1.2.3.tgz ┣━ 📁 go ┃ ┗━ 📁 foo ┃ ┣━ 📄 go.mod ┃ ┣━ 📁 jsii ┃ ┃ ┣━ 📄 foo-1.2.3.tgz ┃ ┃ ┗━ 📄 jsii.go ┃ ┗━ 📄 version ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src ┃ ┗━ 📁 main ┃ ┣━ 📁 java ┃ ┃ ┗━ 📁 com ┃ ┃ ┗━ 📁 acme ┃ ┃ ┗━ 📁 foo ┃ ┃ ┗━ 📄 $Module.java ┃ ┗━ 📁 resources ┃ ┗━ 📁 com ┃ ┗━ 📁 acme ┃ ┗━ 📁 foo ┃ ┣━ 📄 $Module.txt ┃ ┗━ 📄 foo@1.2.3.jsii.tgz ┣━ 📁 js ┃ ┗━ 📄 foo@1.2.3.jsii.tgz ┗━ 📁 python ┣━ 📄 MANIFEST.in ┣━ 📄 pyproject.toml ┣━ 📄 README.md ┣━ 📄 setup.py ┗━ 📁 src ┗━ 📁 foo ┗━ 📁 _jsii ┣━ 📄 __init__.py ┗━ 📄 foo@1.2.3.jsii.tgz `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("foo", "1.2.3", "foo-1.2.3.tgz")] `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` Test assembly: foo Com.Acme.Foo UNLICENSED 1.2.3 Test en-US https://test.nope/foo foo.nope.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Com.Acme.Foo.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { new Com.Acme.Bar.Internal.DependencyResolution.Anchor(); } } } `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/foo-1.2.3.tgz 1`] = `dotnet/Com.Acme.Foo/foo-1.2.3.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/go.mod 1`] = ` module foo go 1.18 require ( github.com/aws/jsii-runtime-go v0.0.0 bar/v4 v4.5.6-pre.1337 ) `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/jsii/foo-1.2.3.tgz 1`] = `go/foo/jsii/foo-1.2.3.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/jsii/jsii.go 1`] = ` // Package jsii contains the functionaility needed for jsii packages to // initialize their dependencies and themselves. Users should never need to use this package // directly. If you find you need to - please report a bug at // https://github.com/aws/jsii/issues/new/choose package jsii import ( bar "bar/v4/jsii" _ "embed" _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) //go:embed foo-1.2.3.tgz var tarball []byte // Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. // The implementation is idempotent (and hence safe to be called over and over). func Initialize() { // Ensure all dependencies are initialized bar.Initialize() // Load this library into the kernel _jsii_.Load("foo", "1.2.3", tarball) } `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/version 1`] = ` 1.2.3 `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/pom.xml 1`] = ` 4.0.0 \${project.groupId}:\${project.artifactId} Test assembly: foo https://test.nope/foo Test test scm:git:foo.nope.git foo.nope.git com.acme foo 1.2.3 jar UTF-8 com.acme bar [4.5.6-pre.1337,5.0.0) software.amazon.jsii jsii-runtime [0.0.0-SNAPSHOT] org.jetbrains annotations [16.0.3,20.0.0) javax.annotation javax.annotation-api [1.3.2,1.4.0) compile org.apache.maven.plugins maven-compiler-plugin 3.11.0 1.8 1.8 true 4096m org.apache.maven.plugins maven-jar-plugin 3.3.0 true true true org.apache.maven.plugins maven-source-plugin 3.3.0 attach-sources jar org.apache.maven.plugins maven-javadoc-plugin 3.5.0 attach-javadocs jar false protected **/$Module.java -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 none true org.apache.maven.plugins maven-enforcer-plugin 3.3.0 enforce-maven enforce 3.6 org.codehaus.mojo versions-maven-plugin 2.16.0 false `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` package com.acme.foo; import static java.util.Arrays.asList; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.Reader; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.List; import java.util.Map; import software.amazon.jsii.JsiiModule; @software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); private static Map load() { final Map result = new HashMap<>(); final ClassLoader cl = $Module.class.getClassLoader(); try (final InputStream is = cl.getResourceAsStream("com/acme/foo/$Module.txt"); final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); final BufferedReader br = new BufferedReader(rd)) { br.lines() .filter(line -> !line.trim().isEmpty()) .forEach(line -> { final String[] parts = line.split("=", 2); final String fqn = parts[0]; final String className = parts[1]; result.put(fqn, className); }); } catch (final IOException exception) { throw new UncheckedIOException(exception); } return result; } private final Map> cache = new HashMap<>(); public $Module() { super("foo", "1.2.3", $Module.class, "foo@1.2.3.jsii.tgz"); } @Override public List> getDependencies() { return asList(com.acme.bar.$Module.class); } @Override protected Class resolveClass(final String fqn) throws ClassNotFoundException { if (!MODULE_TYPES.containsKey(fqn)) { throw new ClassNotFoundException("Unknown JSII type: " + fqn); } String className = MODULE_TYPES.get(fqn); if (!this.cache.containsKey(className)) { this.cache.put(className, this.findClass(className)); } return this.cache.get(className); } private Class findClass(final String binaryName) { try { return Class.forName(binaryName); } catch (final ClassNotFoundException exception) { throw new RuntimeException(exception); } } } `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /js/foo@1.2.3.jsii.tgz 1`] = `js/foo@1.2.3.jsii.tgz is a tarball`; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/MANIFEST.in 1`] = ` include pyproject.toml `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/README.md 1`] = ` foo === `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/pyproject.toml 1`] = ` [build-system] requires = ["setuptools~=67.3.2", "wheel~=0.40"] build-backend = "setuptools.build_meta" [tool.pyright] defineConstant = { DEBUG = true } pythonVersion = "3.7" pythonPlatform = "All" reportSelfClsParameterName = false `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/setup.py 1`] = ` import json import setuptools kwargs = json.loads( """ { "name": "foo", "version": "1.2.3", "description": "Test assembly: foo", "license": "UNLICENSED", "url": "https://test.nope/foo", "long_description_content_type": "text/markdown", "author": "Test", "bdist_wheel": { "universal": true }, "project_urls": { "Source": "foo.nope.git" }, "package_dir": { "": "src" }, "packages": [ "foo._jsii" ], "package_data": { "foo._jsii": [ "foo@1.2.3.jsii.tgz" ] }, "python_requires": "~=3.7", "install_requires": [ "bar>=4.5.6.dev1337, <5.0.0", "jsii<0.0.1", "publication>=0.0.3", "typeguard~=2.13.3" ], "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Typing :: Typed" ], "scripts": [] } """ ) with open("README.md", encoding="utf8") as fp: kwargs["long_description"] = fp.read() setuptools.setup(**kwargs) `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/src/foo/_jsii/__init__.py 1`] = ` import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from typeguard import check_type import bar._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "foo", "1.2.3", __name__[0:-6], "foo@1.2.3.jsii.tgz" ) __all__ = [ "__jsii_assembly__", ] publication.publish() `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/src/foo/_jsii/foo@1.2.3.jsii.tgz 1`] = `python/src/foo/_jsii/foo@1.2.3.jsii.tgz is a tarball`; exports[`foo@2.0.0-rc.42: / 1`] = ` ┣━ 📁 dotnet ┃ ┗━ 📁 Com.Acme.Foo ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┣━ 📁 Com ┃ ┃ ┗━ 📁 Acme ┃ ┃ ┗━ 📁 Foo ┃ ┃ ┗━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┣━ 📄 Com.Acme.Foo.csproj ┃ ┗━ 📄 foo-2.0.0-rc.42.tgz ┣━ 📁 go ┃ ┗━ 📁 foo ┃ ┣━ 📄 go.mod ┃ ┣━ 📁 jsii ┃ ┃ ┣━ 📄 foo-2.0.0-rc.42.tgz ┃ ┃ ┗━ 📄 jsii.go ┃ ┗━ 📄 version ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src ┃ ┗━ 📁 main ┃ ┣━ 📁 java ┃ ┃ ┗━ 📁 com ┃ ┃ ┗━ 📁 acme ┃ ┃ ┗━ 📁 foo ┃ ┃ ┗━ 📄 $Module.java ┃ ┗━ 📁 resources ┃ ┗━ 📁 com ┃ ┗━ 📁 acme ┃ ┗━ 📁 foo ┃ ┣━ 📄 $Module.txt ┃ ┗━ 📄 foo@2.0.0-rc.42.jsii.tgz ┣━ 📁 js ┃ ┗━ 📄 foo@2.0.0-rc.42.jsii.tgz ┗━ 📁 python ┣━ 📄 MANIFEST.in ┣━ 📄 pyproject.toml ┣━ 📄 README.md ┣━ 📄 setup.py ┗━ 📁 src ┗━ 📁 foo ┗━ 📁 _jsii ┣━ 📄 __init__.py ┗━ 📄 foo@2.0.0-rc.42.jsii.tgz `; exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("foo", "2.0.0-rc.42", "foo-2.0.0-rc.42.tgz")] `; exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` Test assembly: foo Com.Acme.Foo UNLICENSED 2.0.0-rc.42 Test en-US https://test.nope/foo foo.nope.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Com.Acme.Foo.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { } } } `; exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/foo-2.0.0-rc.42.tgz 1`] = `dotnet/Com.Acme.Foo/foo-2.0.0-rc.42.tgz is a tarball`; exports[`foo@2.0.0-rc.42: /go/foo/go.mod 1`] = ` module foo/v2 go 1.18 require ( github.com/aws/jsii-runtime-go v0.0.0 ) `; exports[`foo@2.0.0-rc.42: /go/foo/jsii/foo-2.0.0-rc.42.tgz 1`] = `go/foo/jsii/foo-2.0.0-rc.42.tgz is a tarball`; exports[`foo@2.0.0-rc.42: /go/foo/jsii/jsii.go 1`] = ` // Package jsii contains the functionaility needed for jsii packages to // initialize their dependencies and themselves. Users should never need to use this package // directly. If you find you need to - please report a bug at // https://github.com/aws/jsii/issues/new/choose package jsii import ( _ "embed" _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) //go:embed foo-2.0.0-rc.42.tgz var tarball []byte // Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. // The implementation is idempotent (and hence safe to be called over and over). func Initialize() { // Load this library into the kernel _jsii_.Load("foo", "2.0.0-rc.42", tarball) } `; exports[`foo@2.0.0-rc.42: /go/foo/version 1`] = ` 2.0.0-rc.42 `; exports[`foo@2.0.0-rc.42: /java/pom.xml 1`] = ` 4.0.0 \${project.groupId}:\${project.artifactId} Test assembly: foo https://test.nope/foo Test test scm:git:foo.nope.git foo.nope.git com.acme foo 2.0.0-rc.42 jar UTF-8 software.amazon.jsii jsii-runtime [0.0.0-SNAPSHOT] org.jetbrains annotations [16.0.3,20.0.0) javax.annotation javax.annotation-api [1.3.2,1.4.0) compile org.apache.maven.plugins maven-compiler-plugin 3.11.0 1.8 1.8 true 4096m org.apache.maven.plugins maven-jar-plugin 3.3.0 true true true org.apache.maven.plugins maven-source-plugin 3.3.0 attach-sources jar org.apache.maven.plugins maven-javadoc-plugin 3.5.0 attach-javadocs jar false protected **/$Module.java -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 none true org.apache.maven.plugins maven-enforcer-plugin 3.3.0 enforce-maven enforce 3.6 org.codehaus.mojo versions-maven-plugin 2.16.0 false `; exports[`foo@2.0.0-rc.42: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` package com.acme.foo; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.Reader; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import software.amazon.jsii.JsiiModule; @software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); private static Map load() { final Map result = new HashMap<>(); final ClassLoader cl = $Module.class.getClassLoader(); try (final InputStream is = cl.getResourceAsStream("com/acme/foo/$Module.txt"); final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); final BufferedReader br = new BufferedReader(rd)) { br.lines() .filter(line -> !line.trim().isEmpty()) .forEach(line -> { final String[] parts = line.split("=", 2); final String fqn = parts[0]; final String className = parts[1]; result.put(fqn, className); }); } catch (final IOException exception) { throw new UncheckedIOException(exception); } return result; } private final Map> cache = new HashMap<>(); public $Module() { super("foo", "2.0.0-rc.42", $Module.class, "foo@2.0.0-rc.42.jsii.tgz"); } @Override protected Class resolveClass(final String fqn) throws ClassNotFoundException { if (!MODULE_TYPES.containsKey(fqn)) { throw new ClassNotFoundException("Unknown JSII type: " + fqn); } String className = MODULE_TYPES.get(fqn); if (!this.cache.containsKey(className)) { this.cache.put(className, this.findClass(className)); } return this.cache.get(className); } private Class findClass(final String binaryName) { try { return Class.forName(binaryName); } catch (final ClassNotFoundException exception) { throw new RuntimeException(exception); } } } `; exports[`foo@2.0.0-rc.42: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; exports[`foo@2.0.0-rc.42: /java/src/main/resources/com/acme/foo/foo@2.0.0-rc.42.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@2.0.0-rc.42.jsii.tgz is a tarball`; exports[`foo@2.0.0-rc.42: /js/foo@2.0.0-rc.42.jsii.tgz 1`] = `js/foo@2.0.0-rc.42.jsii.tgz is a tarball`; exports[`foo@2.0.0-rc.42: /python/MANIFEST.in 1`] = ` include pyproject.toml `; exports[`foo@2.0.0-rc.42: /python/README.md 1`] = ` foo === `; exports[`foo@2.0.0-rc.42: /python/pyproject.toml 1`] = ` [build-system] requires = ["setuptools~=67.3.2", "wheel~=0.40"] build-backend = "setuptools.build_meta" [tool.pyright] defineConstant = { DEBUG = true } pythonVersion = "3.7" pythonPlatform = "All" reportSelfClsParameterName = false `; exports[`foo@2.0.0-rc.42: /python/setup.py 1`] = ` import json import setuptools kwargs = json.loads( """ { "name": "foo", "version": "2.0.0.rc42", "description": "Test assembly: foo", "license": "UNLICENSED", "url": "https://test.nope/foo", "long_description_content_type": "text/markdown", "author": "Test", "bdist_wheel": { "universal": true }, "project_urls": { "Source": "foo.nope.git" }, "package_dir": { "": "src" }, "packages": [ "foo._jsii" ], "package_data": { "foo._jsii": [ "foo@2.0.0-rc.42.jsii.tgz" ] }, "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3", "typeguard~=2.13.3" ], "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Typing :: Typed" ], "scripts": [] } """ ) with open("README.md", encoding="utf8") as fp: kwargs["long_description"] = fp.read() setuptools.setup(**kwargs) `; exports[`foo@2.0.0-rc.42: /python/src/foo/_jsii/__init__.py 1`] = ` import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from typeguard import check_type __jsii_assembly__ = jsii.JSIIAssembly.load( "foo", "2.0.0-rc.42", __name__[0:-6], "foo@2.0.0-rc.42.jsii.tgz" ) __all__ = [ "__jsii_assembly__", ] publication.publish() `; exports[`foo@2.0.0-rc.42: /python/src/foo/_jsii/foo@2.0.0-rc.42.jsii.tgz 1`] = `python/src/foo/_jsii/foo@2.0.0-rc.42.jsii.tgz is a tarball`; exports[`foo@4.5.6-pre.1337: / 1`] = ` ┣━ 📁 dotnet ┃ ┗━ 📁 Com.Acme.Foo ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┣━ 📁 Com ┃ ┃ ┗━ 📁 Acme ┃ ┃ ┗━ 📁 Foo ┃ ┃ ┗━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┣━ 📄 Com.Acme.Foo.csproj ┃ ┗━ 📄 foo-4.5.6-pre.1337.tgz ┣━ 📁 go ┃ ┗━ 📁 foo ┃ ┣━ 📄 go.mod ┃ ┣━ 📁 jsii ┃ ┃ ┣━ 📄 foo-4.5.6-pre.1337.tgz ┃ ┃ ┗━ 📄 jsii.go ┃ ┗━ 📄 version ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src ┃ ┗━ 📁 main ┃ ┣━ 📁 java ┃ ┃ ┗━ 📁 com ┃ ┃ ┗━ 📁 acme ┃ ┃ ┗━ 📁 foo ┃ ┃ ┗━ 📄 $Module.java ┃ ┗━ 📁 resources ┃ ┗━ 📁 com ┃ ┗━ 📁 acme ┃ ┗━ 📁 foo ┃ ┣━ 📄 $Module.txt ┃ ┗━ 📄 foo@4.5.6-pre.1337.jsii.tgz ┣━ 📁 js ┃ ┗━ 📄 foo@4.5.6-pre.1337.jsii.tgz ┗━ 📁 python ┣━ 📄 MANIFEST.in ┣━ 📄 pyproject.toml ┣━ 📄 README.md ┣━ 📄 setup.py ┗━ 📁 src ┗━ 📁 foo ┗━ 📁 _jsii ┣━ 📄 __init__.py ┗━ 📄 foo@4.5.6-pre.1337.jsii.tgz `; exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("foo", "4.5.6-pre.1337", "foo-4.5.6-pre.1337.tgz")] `; exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` Test assembly: foo Com.Acme.Foo UNLICENSED 4.5.6-pre.1337 Test en-US https://test.nope/foo foo.nope.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Com.Acme.Foo.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { } } } `; exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/foo-4.5.6-pre.1337.tgz 1`] = `dotnet/Com.Acme.Foo/foo-4.5.6-pre.1337.tgz is a tarball`; exports[`foo@4.5.6-pre.1337: /go/foo/go.mod 1`] = ` module foo/v4 go 1.18 require ( github.com/aws/jsii-runtime-go v0.0.0 ) `; exports[`foo@4.5.6-pre.1337: /go/foo/jsii/foo-4.5.6-pre.1337.tgz 1`] = `go/foo/jsii/foo-4.5.6-pre.1337.tgz is a tarball`; exports[`foo@4.5.6-pre.1337: /go/foo/jsii/jsii.go 1`] = ` // Package jsii contains the functionaility needed for jsii packages to // initialize their dependencies and themselves. Users should never need to use this package // directly. If you find you need to - please report a bug at // https://github.com/aws/jsii/issues/new/choose package jsii import ( _ "embed" _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) //go:embed foo-4.5.6-pre.1337.tgz var tarball []byte // Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. // The implementation is idempotent (and hence safe to be called over and over). func Initialize() { // Load this library into the kernel _jsii_.Load("foo", "4.5.6-pre.1337", tarball) } `; exports[`foo@4.5.6-pre.1337: /go/foo/version 1`] = ` 4.5.6-pre.1337 `; exports[`foo@4.5.6-pre.1337: /java/pom.xml 1`] = ` 4.0.0 \${project.groupId}:\${project.artifactId} Test assembly: foo https://test.nope/foo Test test scm:git:foo.nope.git foo.nope.git com.acme foo 4.5.6-pre.1337 jar UTF-8 software.amazon.jsii jsii-runtime [0.0.0-SNAPSHOT] org.jetbrains annotations [16.0.3,20.0.0) javax.annotation javax.annotation-api [1.3.2,1.4.0) compile org.apache.maven.plugins maven-compiler-plugin 3.11.0 1.8 1.8 true 4096m org.apache.maven.plugins maven-jar-plugin 3.3.0 true true true org.apache.maven.plugins maven-source-plugin 3.3.0 attach-sources jar org.apache.maven.plugins maven-javadoc-plugin 3.5.0 attach-javadocs jar false protected **/$Module.java -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 none true org.apache.maven.plugins maven-enforcer-plugin 3.3.0 enforce-maven enforce 3.6 org.codehaus.mojo versions-maven-plugin 2.16.0 false `; exports[`foo@4.5.6-pre.1337: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` package com.acme.foo; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.Reader; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import software.amazon.jsii.JsiiModule; @software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); private static Map load() { final Map result = new HashMap<>(); final ClassLoader cl = $Module.class.getClassLoader(); try (final InputStream is = cl.getResourceAsStream("com/acme/foo/$Module.txt"); final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); final BufferedReader br = new BufferedReader(rd)) { br.lines() .filter(line -> !line.trim().isEmpty()) .forEach(line -> { final String[] parts = line.split("=", 2); final String fqn = parts[0]; final String className = parts[1]; result.put(fqn, className); }); } catch (final IOException exception) { throw new UncheckedIOException(exception); } return result; } private final Map> cache = new HashMap<>(); public $Module() { super("foo", "4.5.6-pre.1337", $Module.class, "foo@4.5.6-pre.1337.jsii.tgz"); } @Override protected Class resolveClass(final String fqn) throws ClassNotFoundException { if (!MODULE_TYPES.containsKey(fqn)) { throw new ClassNotFoundException("Unknown JSII type: " + fqn); } String className = MODULE_TYPES.get(fqn); if (!this.cache.containsKey(className)) { this.cache.put(className, this.findClass(className)); } return this.cache.get(className); } private Class findClass(final String binaryName) { try { return Class.forName(binaryName); } catch (final ClassNotFoundException exception) { throw new RuntimeException(exception); } } } `; exports[`foo@4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; exports[`foo@4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/foo@4.5.6-pre.1337.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@4.5.6-pre.1337.jsii.tgz is a tarball`; exports[`foo@4.5.6-pre.1337: /js/foo@4.5.6-pre.1337.jsii.tgz 1`] = `js/foo@4.5.6-pre.1337.jsii.tgz is a tarball`; exports[`foo@4.5.6-pre.1337: /python/MANIFEST.in 1`] = ` include pyproject.toml `; exports[`foo@4.5.6-pre.1337: /python/README.md 1`] = ` foo === `; exports[`foo@4.5.6-pre.1337: /python/pyproject.toml 1`] = ` [build-system] requires = ["setuptools~=67.3.2", "wheel~=0.40"] build-backend = "setuptools.build_meta" [tool.pyright] defineConstant = { DEBUG = true } pythonVersion = "3.7" pythonPlatform = "All" reportSelfClsParameterName = false `; exports[`foo@4.5.6-pre.1337: /python/setup.py 1`] = ` import json import setuptools kwargs = json.loads( """ { "name": "foo", "version": "4.5.6.dev1337", "description": "Test assembly: foo", "license": "UNLICENSED", "url": "https://test.nope/foo", "long_description_content_type": "text/markdown", "author": "Test", "bdist_wheel": { "universal": true }, "project_urls": { "Source": "foo.nope.git" }, "package_dir": { "": "src" }, "packages": [ "foo._jsii" ], "package_data": { "foo._jsii": [ "foo@4.5.6-pre.1337.jsii.tgz" ] }, "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3", "typeguard~=2.13.3" ], "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Typing :: Typed" ], "scripts": [] } """ ) with open("README.md", encoding="utf8") as fp: kwargs["long_description"] = fp.read() setuptools.setup(**kwargs) `; exports[`foo@4.5.6-pre.1337: /python/src/foo/_jsii/__init__.py 1`] = ` import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from typeguard import check_type __jsii_assembly__ = jsii.JSIIAssembly.load( "foo", "4.5.6-pre.1337", __name__[0:-6], "foo@4.5.6-pre.1337.jsii.tgz" ) __all__ = [ "__jsii_assembly__", ] publication.publish() `; exports[`foo@4.5.6-pre.1337: /python/src/foo/_jsii/foo@4.5.6-pre.1337.jsii.tgz 1`] = `python/src/foo/_jsii/foo@4.5.6-pre.1337.jsii.tgz is a tarball`;